The following code snippet converts an ASCII byte array into a string and prints the converted string to the console. The Encoding.GetString() method converts an array of bytes into a string. The following code example converts a C# string into a byte array in Ascii format and prints the converted bytes to the console string author = 'Mahesh Chand' īyte bytes = (author) The Encoding.GetBytes() method converts a string into a bytes array in C#. That means you can use its functionality via its derived classes only.