How to convert 16 bit byte to 2 string characters
Posted on 2008-10-29
I have a C# app that reads binary data from an app through a C++ import.
The data i am trying to read is held in short integers so i need to split the int16 into its byte pairs and read the values into its two strings.
I do it in VB.net with the following function
Public Shared Function ByteToString(ByVal bytStr As Byte) As String
Dim strCon As String 'hold the string
strCon = Convert.ToChar(bytStr)
'return the string
But i cannot find the same functionality in C#.
Supposedly this should work but all i store then is the numeric value of the byte
Thanks for any help!!