I have a string representing bits, such as:
\"0000101000010000\"
I want to convert it to get an array of bytes such as:
{0x
You can go any of below,
byte []bytes = System.Text.Encoding.UTF8.GetBytes("Hi"); string str = System.Text.Encoding.UTF8.GetString(bytes); byte []bytesNew = System.Convert.FromBase64String ("Hello!"); string strNew = System.Convert.ToBase64String(bytesNew);