Link to home
Start Free TrialLog in
Avatar of the_b1ackfox
the_b1ackfoxFlag for United States of America

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
SOLUTION
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of the_b1ackfox

ASKER

After seeing both of your requests, I made up a file to demonstrate what was going on.  The only problem is that the issue did not show up in the file I created.  So that go t me thinking about the file I had originally used...  I *did* cut and paste almost all of the file and then saved it as a text file.   So before this goes any further, I think I will recreate the template manually first as there may have been something that slipped into the file with a paste...
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
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!