whats the equivalent of vbcrlf,vbcr,vblf (vbscript) in c#.net

S

sundar_s1210

i have the following code in asp using vbscript

replace(str,vbcrlf," ")
replace(str,vbcr," ")
replace(str,vblf," ")

where str is any string

i want to convert this code in asp.net using c#.ne


-
sundar_s121
 
S

Shawn

I think what you are looking for is \n
Not sure if C# has as many variants as VB. I think \n is the only one.

Shawn
 
J

Juan T. Llibre

See Manohar's reply.





Shawn said:
I think what you are looking for is \n
Not sure if C# has as many variants as VB. I think \n is the only one.

Shawn
 
G

Guest

Assuming you're actually using the new strings returned, here's the
equivalent from our Instant C# VB.NET to C# converter:

newstring = str.Replace("\r\n", " ");
newstring = str.Replace("\r", " ");
newstring = str.Replace("\n", " ");

The first line could also be:
newstring = str.Replace(System.Environment.NewLine, " ");
(our converter has an option to use this more system-independent version)

David Anton
www.tangiblesoftwaresolutions.com
Home of the Instant C# VB.NET to C# converter
and the Instant VB C# to VB.NET converter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top