c# string to byte array
string author = "Mahesh Chand";
// Convert a C# string to a byte array
byte[] bytes = Encoding.ASCII.GetBytes(author);
// Convert a byte array to a C# string.
string str = Encoding.ASCII.GetString(bytes);// Convert a string to a C# byte[]
//change encoding depending on your data
string someText = "some data as text.";
byte[] bytes = Encoding.ASCII.GetBytes(author);
// Convert a byte array to a C# string
string str = Encoding.ASCII.GetString(bytes);
Console.WriteLine(str);
Also in C#:
- c# graphics draw filled rectangle
- lat long data type c#
- test how catch exception c#
- c# read char
- ubuntu: how to open the terminal from c#
- C# foreach loop async but wait at end
- how to get the last element in an array in c#
- enums c#
- make an object disappear from a c# script unity
- perlin noise unity
- c# skip following code in loop
- internal c#
- linq foreach c#
- how to get object to spawn in a curcle
- devexpress objectspace to session
- how to convert int to string unity c#
- winforms c# add data to datagridview with a button
- unity coroutine
- random bool c#
- unity custom update
- c# how to delete a file
- c# pass mouse events to parent
- C# type cast float to string
- parse strings into words C#