How to remove New Line character (\n) in C# .Net

Last Reply on Feb 08, 2015 10:46 PM By Mudassar

Posted on Feb 08, 2015 08:34 AM

I have a string below

this is a text sms
text goes here
I Agree to abide all Terms & Conditions listed at abcdtexttextein visit for test sms
check sms api for testing sms service.

 when i type its shows count 160 character and when i inser in sql and count it shows 165 character. my aql query given below: 

SELECT len(smstext) as char FROM smsdata 

How to resolve this

You are viewing reply posted by: Mudassar on Feb 08, 2015 10:46 PM.
Posted on Feb 08, 2015 10:46 PM

You can replace \n with blank. And regarding any API we cannot comment.

string s = "a\\nb".Replace("\\n", "");