G
Guest
Hi there,
I have got the following piece of VB code to be translated to C#, I used
System.Text.Encoding.Default.GetBytes(myStr, 1, 10, aBytes, 0) but the result
of aBytes is different from what I have got in VB, please help! Thanks!
VB code:
Dim mystr As String
mystr = "<PURCHASE_ORDER partner=..."
Dim aByte() As Byte
ReDim aByte(10)
aByte = MidB(mystr, 1, 10)
The aByte(10) returns 60, 0, 80, 0, 85,0, 82, 0, 67,0
C# code:
Byte[] aByte = new Byte[10];
string myStr = "<PURCHASE_ORDER partner=...";
int iByteCount = System.Text.Encoding.Default.GetBytes(myStr, 1,10, aByte,0);
The aBtye returns 80,85,82,67,72,65,83,69,95,79
I have got the following piece of VB code to be translated to C#, I used
System.Text.Encoding.Default.GetBytes(myStr, 1, 10, aBytes, 0) but the result
of aBytes is different from what I have got in VB, please help! Thanks!
VB code:
Dim mystr As String
mystr = "<PURCHASE_ORDER partner=..."
Dim aByte() As Byte
ReDim aByte(10)
aByte = MidB(mystr, 1, 10)
The aByte(10) returns 60, 0, 80, 0, 85,0, 82, 0, 67,0
C# code:
Byte[] aByte = new Byte[10];
string myStr = "<PURCHASE_ORDER partner=...";
int iByteCount = System.Text.Encoding.Default.GetBytes(myStr, 1,10, aByte,0);
The aBtye returns 80,85,82,67,72,65,83,69,95,79