Reading All File Text
I have a piece of code which may help you, It basically reads every byte of a file including unknown symbols (Converts them to "?"), Just like NotePad++.
Using only File.ReadAllBytes won't read unknown symbols, for example Dll files. It will just show "MZ?".
Thanks to abuckau907.
Code:
byte[] FileBytes = File.ReadAllBytes("C:\\TextFile.txt");
for (Int32 xx = 0; xx <= FileBytes.Length - 1; xx++)
{
if (FileBytes[xx] == 0)
{
FileBytes[xx] = 63;
}
}
string asciiStr = System.Text.Encoding.ASCII.GetString(FileBytes);
Control.Text = asciiStr;
Thanks to abuckau907.
