Hi All
When reading data from a text file using the StreamReader class it is adding unwanted characters to the data.
When I read my text file using NotePad it looks like this:
"","","1-RF98G","ENU","","Jones",
When I read it into a string variable using the following code:
The contents of my string variable look like this:
"\"\",\"\",\"1-RF98G\",\"ENU\",\"\",\"Jones\",
Anybody know why this is happening?
Anybody know how to stop this happening?
TIA
Smeat
When reading data from a text file using the StreamReader class it is adding unwanted characters to the data.
When I read my text file using NotePad it looks like this:
"","","1-RF98G","ENU","","Jones",
When I read it into a string variable using the following code:
Code:
System.IO.StreamReader s = System.IO.File.OpenText(ImportFile);
int counter = 0;
while (s.Peek() > 0)
{
counter ++;
//Loop through each record
string @row = s.ReadLine();
....
The contents of my string variable look like this:
"\"\",\"\",\"1-RF98G\",\"ENU\",\"\",\"Jones\",
Anybody know why this is happening?
Anybody know how to stop this happening?
TIA
Smeat