Seven price
asked on
convert to c# byte
the conversion keep adding strings for this conversion.which is wrong.
Function MakeByte(ByVal text As String) As Byte()
Dim i As Integer
Dim ba(text.Length - 1) As Byte
For i = 1 To Len(text)
ba(i - 1) = Asc(Mid(text, i, 1))
Next
Return ba
End Function
Dont see a problem
ASKER
I want it to convert to c# version. sorry
you mean you want the same code in c#?
public byte[] MakeByte(string text)
{
int i = 0;
byte[] ba = new byte[text.Length];
for (i = 1; i <= Strings.Len(text); i++) {
ba[i - 1] = Strings.Asc(Strings.Mid(text, i, 1));
}
return ba;
}
ASKER
you use converter and Strings.Le and Strings.Asc(Strings
do not exists in the current context.
do not exists in the current context.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
tks