How to do this in C#?
//VC++ :
PackData(CString strInput)
{
CString strReturned;
char nLength = strInput.GetLength() + 2;
char b= 0x03;
char zero = 0x00;
strReturned.Format("%c%c", nLength, b);
strReturned += strInput;
for(int i = 0;i<(32 - nLength); i++)
strReturned += zero;
return strReturned;
}
what does the identical c# code look like?
Thanks!
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

bilnaadRank #2,169 · 655 reputationPosted Nov 1, 2004, 7:58 AM EST
bilnaadRank #2,169 · 655 reputationPosted Nov 1, 2004, 8:00 AM EST
gongdehui62 reputationPosted Nov 1, 2004, 8:04 AM EST