D
dotnetchic
I'm trying to parse a binary file to help me with some analysis...what
I'd like to do is take a byte of data and display its ascii char value
(37='%', 38='&', etc.).
private void ParseFile(string fileName)
{
byte data;
if (File.Exists(fileName))
{
FileStream stream = new FileStream(fileName, FileMode.Open);
BinaryReader br = new BinaryReader(stream, Encoding.ASCII);
data = br.ReadByte();
// display data
}
}
How can I achieve this?
TIA,
SLC
I'd like to do is take a byte of data and display its ascii char value
(37='%', 38='&', etc.).
private void ParseFile(string fileName)
{
byte data;
if (File.Exists(fileName))
{
FileStream stream = new FileStream(fileName, FileMode.Open);
BinaryReader br = new BinaryReader(stream, Encoding.ASCII);
data = br.ReadByte();
// display data
}
}
How can I achieve this?
TIA,
SLC