To get the string from the bytes

Jitendrasoft09
Posted by Jitendrasoft09 under C# category on | Points: 40 | Views : 589
using System;
using System.Text;

class jkExample {

static void Main(string[] args) {

byte[] myBytes = Encoding.ASCII.GetBytes("Jitendra Kumar");
string myString = Encoding.ASCII.GetString(myBytes);

Console.WriteLine("String value: {0}", myString);


Console.ReadLine();
}
}

Comments or Responses

Login to post response