Byte array To String - CSharp System

CSharp examples for System:Byte Array

Description

Byte array To String

Demo Code


using System.Text;
using System;//from   w  w w.  ja v a2s .  com

public class Main{

      public static string BytesToString(byte[] byteArray)
      {
         char[] charArray = new char[byteArray.GetLength(0)];
         Array.Copy(byteArray, charArray, byteArray.Length);

         return new string(charArray);
      }
}

Related Tutorials