Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Convert Byte[] array to string C#

Status
Not open for further replies.

rkt_167

Junior Member level 1
Junior Member level 1
Joined
Aug 9, 2013
Messages
19
Helped
3
Reputation
6
Reaction score
3
Trophy points
3
Visit site
Activity points
163
hi all,
I want to convert byte array in string array as:
byte[] data={11,12,13,14};
should be:
string[] datastring={"11","12",13","14"};
means I don't want to change the data only data type needs to be changed... Give syntax ..

thanks,
 

example using ToString()
Code:
          byte[] data={11,12,13,14};
         string[] datastring = new string[data.Length];
         for (int i = 0; i < data.Length; i++)
         {
             datastring[i] = data[i].ToString();
             Console.WriteLine("btye {0} string {1}", data[i], datastring[i]);
         }
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top