Main Site Documentation

Convert byte[] to string


I know this is probably super simple but I am struggling ( I swear I have figured this out once before).

Tried scouring APIs and google.

For some reason the code goes into in infinite loop of nothingness when I do:

string buffer = BitConverter.ToString(buffer,0)


nevermind I finally found my old code:

char[] temp = Encoding.UFT8.GetChars(buffer);
string received = new string(temp);


Visual basic has many great string utilities. Another option is to create a class library an call the high level functions from your code.

'Convert the byte to string
Return ChrW(Data(0)).ToString


This was in C#


C sharp class libraries can be used in vb and vb libraries can be used in C sharp. I think each language has its strong points and weak points :smile:


Do not forget the
Standard Numeric Format Strings