How to

convert string to byte array

Published: 9. October 2011 | Updated: 9. October 2011
License: Microsoft Public License (MS-PL)
Categories: Converting
Tags: C#
Was this snippet helpful for you? YESYES / NONO

Import namespace

using System.Text;

Code

byte[] bytes = Encoding.UTF8.GetBytes("test");
Send us feedback about this snippet »



Related Snippets: