Monday, April 14, 2008

Replace C# (chr(13), cha(146)

temp+=temp.Replace(chr(13),"<br>"); - MSDN Forums


temp = temp.Replace("" + (char)13, "
");
temp = temp.Replace("" + (char)0x0D, "
");
temp = temp.Replace(((char)0x0D).ToString(), "
");
//I'd use this: temp = temp.Replace("\r", "
");The latter looks far easiest.

1 comment:

Rajeev said...

thanks for posting.
string prodescout = prodesc.Replace("" + (char)146, "'");