[RESOLVED] Help.. Single Byte to String....
I'm trying to find the equivalent of this C# function in VB.NET.
Code:
public static object bdecode_rec(byte[] x, ref int f)
{
byte t = x[f];
if (t == 'i')
{
f += 1;
return decode_int(x, ref f);
}
VB Code:
Public Shared Function bdecode_rec(ByVal x() As Byte, ByRef f As Integer) As Object
Dim t As Byte = x(f)
'Byte t's value is 100.
If System.Convert.ToString(t) = "i" Then
'Above does not work.
f += 1
Return decode_int(x, f)
Obviously I ommitted a lot of code here, but that's not important.
How can I get the string representation of a single byte?
EDIT: Resolved.
Chr(t) returned "d" as a string, the character represented by the value 100 assigned to byte t.