How to

convert byte array to string

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

var bytes = new byte[] { 116, 101, 115, 116 };
            
string text = Encoding.UTF8.GetString(bytes);
Send us feedback about this snippet »



Related Snippets: