R
Reddy
Hi,
I am using .NET 1.1 and SQLServer 2000. I have a table with some strings
with new line chars. E.g.: "This is line1.\nThis is line2.".
When I read this using a DataReader into a string, it is reading as
@"This is line1.\nThis is line2.". So, when I display it using a
MessageBox.Show(myMessage), it is showing "This is line1.\nThis is line2.".
Instead of:
This is line1.
This is line2.
When I inspected my string in vs.net, it is showing
@"This is line1.\nThis is line2."
How do I get rid off the @ sign or make it interpret newline as newline char
and not "\n" literal string?
I tried "This is line1.\\nThis is line2.".
It shows up as "This is line1.\\nThis is line2.".
thanks,
- Reddy
I am using .NET 1.1 and SQLServer 2000. I have a table with some strings
with new line chars. E.g.: "This is line1.\nThis is line2.".
When I read this using a DataReader into a string, it is reading as
@"This is line1.\nThis is line2.". So, when I display it using a
MessageBox.Show(myMessage), it is showing "This is line1.\nThis is line2.".
Instead of:
This is line1.
This is line2.
When I inspected my string in vs.net, it is showing
@"This is line1.\nThis is line2."
How do I get rid off the @ sign or make it interpret newline as newline char
and not "\n" literal string?
I tried "This is line1.\\nThis is line2.".
It shows up as "This is line1.\\nThis is line2.".
thanks,
- Reddy