the_b1ackfox
asked on
C# IO discarding escape sequences
Hello Experts,
I am trying to load a template in c# as a text file. It works pretty well but I am running into problems because I am losing the escape sequences during the load. Can someone tell me how to load a text file that can include quotes? If there is better way to do this?
below you'll find a portion of the method I am working with:
using (StreamReader SR = new StreamReader(Data))
{
string line="";
while ((line = SR.ReadLine()) != null)
{
ProcessLine(line);
}
SR.Close();
SR.Dispose();
}
Thank you in advance!
Fox
I am trying to load a template in c# as a text file. It works pretty well but I am running into problems because I am losing the escape sequences during the load. Can someone tell me how to load a text file that can include quotes? If there is better way to do this?
below you'll find a portion of the method I am working with:
using (StreamReader SR = new StreamReader(Data))
{
string line="";
while ((line = SR.ReadLine()) != null)
{
ProcessLine(line);
}
SR.Close();
SR.Dispose();
}
Thank you in advance!
Fox
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
James, you are probably correct. But after some thinking about my overall objective, I decided to make a tactical change. (ie, I wouldn't have to deal with working through some of the additional objectives if I made a strategic change now, lol)
I have abandoned the process for a better one and I am past this issue. Thank you all.
I have abandoned the process for a better one and I am past this issue. Thank you all.
ASKER
Fernando and Surendra, your responses helped me increase my perspective by having me go back to the basics and reexamine what I was doing. James, your response gave me insight and knowledge which I value.
Thank you all!
Thank you all!
ASKER