Connecting Tech Pros Worldwide Forums | Help | Site Map

I need help converting a ByteArray to char

Newbie
 
Join Date: Sep 2006
Posts: 1
#1: Sep 29 '06
int nBytes = 256;
byte[] ByteArray = new byte[nBytes];
int nBytesRead = inputStream.Read(ByteArray, 0 , nBytes);

recorderID = "";


for (int i = 0; i <= 14; i++)
{
recorderID += char.ToString((char )ByteArray[14]);
}

in the recorderID I only need 14 bytes from the bytearray for the recorderID.
thanks

Banfa's Avatar
AdministratorVoR
 
Join Date: Feb 2006
Location: South West UK
Posts: 6,195
#2: Sep 29 '06

re: I need help converting a ByteArray to char


[14]

should be

[i]
Reply


Similar C / C++ bytes