title: c++ wchar array to c#
body: <p>I have no knowledge of C++ and I have to cenvert some code to C#. I've managed to do some bits but I don't really understand how to convert a few lines so I'm here asking for help.</p>
  
  <p>This is the C++ code:</p>
  
  <pre><code>            WCHAR wsSerial[MAX_PATH]={'\0'};
              WCHAR wsS2[MAX_PATH]={'\0'};
  
              wcscpy_s(wsSerial, MAX_PATH, m_strSerial);
              wcscpy_s(wsS2,MAX_PATH,wsSerial+8);
              wsS2[8]=NULL;
              ULONG ulCode2 = wcstoul(wsS2, NULL,10);
  </code></pre>
  
  <p>This is what I have in C#:</p>
  
  <pre><code>        string wsSerial;
          string wsS2;
  
          wsSerial = mSerial; //an external input
          wsS2 = wsSerial + 8;
          wsS2= wsSerial.Substring(0, 8);
          long ulCode2 = long.Parse(wsS2);
  </code></pre>
  
  <p>So I have two questions:</p>
  
  <ol>
  <li>wsSerial is an array in C++ but I don't need an array for this in C#, do I? I mean, all it does is store a large number which is later converted into a numeric value, right?</li>
  <li>What exactly does this do? wcscpy_s(wsS2,MAX_PATH,wsSerial+8). The + 8 throws me off.</li>
  </ol>