Jason,
Thank you so much for your help.
Applying your example helped solve my problem.
>Dmitry,
>
>Depending on what you're doing with both of these requests, I suggest you look at RegEx (In System.Text namespace). It may be overkill for some of what you need, but it's invaluable for searching and replacing different sections of a string. And if you have a definable pattern you're seeking, it's faster than traversing a string character by character.
>
>String.Replace accepts escape characters:
>
>string newLineString = "Some text with a CHR(10)";
>newLineString = newLineString.Replace("\n", "I'm a newline character");
>
>string crString = "Text with a CHR(13)";
>crString = crString.Replace("\r", "I'm a carriage return");
>
>
>If you need both, there's Environment.NewLine (In the System namespace). Search help on Environment.NewLine for examples.
>
>Hope that helps,
>---J
>
>
>>I need to see what is inside a string in C# code. In VFP I would parse the string and look at each character using ASC() function. What is the equivalent of this function in C#?
>>
>>Also, C# has a string method .Replace() which allows to replace one character with another. If I wanted to replace character CHR(13) or CHR(10) in a string with something different, how would I use it in the .Replace() method of C#?
>>
>>Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham