I don't have knowledge of C ++, and I need to convert some code to C #. I managed to make a few bits, but I donβt really understand how to convert several lines, so here I ask for help.
This is the C ++ 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);
This is what I have in C #:
string wsSerial; string wsS2; wsSerial = mSerial;
I have two questions:
- wsSerial is an array in C ++, but I don't need an array for this in C #, right? I mean, all he does is store a large amount, which is later converted to a numerical value, right?
- What exactly does this do? wcscpy_s (WSS2, MAX_PATH, wsSerial + 8). + 8 throws me away.
source share