I am reading a text file using TextReader reader = new
StreamReader("file.txt"); like I have done many a times before. I then
execute the statement string a = reader.ReadToEnd(); this string is then
sent into a function to convert its contents (hex string) into a byte array.
Well when this pass occurs the HextoByteArray function says the input is in
an invalid format. I think for somereason there is some whitespace/null
character at the end of the file that is getting read in. To debug I
manually sent the string into the function and it worked fine, so it is
somethign with my reading of the file.
Thanks
Ignacio Machin ( .NET/ C# MVP ) - 19 Jul 2007 18:23 GMT
Hi,
>I am reading a text file using TextReader reader = new
>StreamReader("file.txt"); like I have done many a times before. I then
[quoted text clipped - 5 lines]
>To debug I manually sent the string into the function and it worked fine,
>so it is somethign with my reading of the file.
Can you post the HextoByteArray method?
Must probably you are trying to convert a string representation of a hex
stream into byte array.