get string bytes c# code example Example: c# get bytes from string byte[] bytes = Encoding.ASCII.GetBytes(someString);