vbcrlf equivalent in c#

vbcrlf equivalent in c#

Anonymous
Not applicable
1,141 Views
4 Replies
Message 1 of 5

vbcrlf equivalent in c#

Anonymous
Not applicable
Searching for hours in the help for c# couldn't find anything under carriage
return or line feed
Finally used reflector to look at a vb code snippet and found
ChrW(13) + ChrW(10)

as in

ed.WriteMessage(btr.Name + ChrW(13) + ChrW(10))

however when i put that in code error says ChrW doesn't exist in this
namespace

so search in help for ChrW under c# and find the method which says it's
under Strings.ChrW

but when I added strings. i get error that Strings isn't in namespace

in the help page Filtered by C# entering chrw in index pulls up a page
saying it's visualbasic

and the strings class is under microsoft.visualbasic namespace...but i'm
trying to do it in c# so i'm a bit confused

finally at the end of that method description it shows function defs for
diff langs

i had to enter a function def

public static char ChrW(
int CharCode
)in order to use chrw but i dont' think that should be required????also i
had to change & to + to concatenate the chrw returnwhat am i missing?thanks
mark
0 Likes
1,142 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
how about "\r\n" ?

or

ed.WriteMessage("\n{0}", btr.Name); Edited by: danielm103 on Sep 10, 2009 9:49 PM
0 Likes
Message 3 of 5

Anonymous
Not applicable
perhaps try ...
Environment.NewLine

/// kdub

"mp" wrote in message
news:6252744@discussion.autodesk.com...
Searching for hours in the help for c# couldn't find anything under carriage
return or line feed
Finally used reflector to look at a vb code snippet and found
ChrW(13) + ChrW(10)

as in

ed.WriteMessage(btr.Name + ChrW(13) + ChrW(10))

however when i put that in code error says ChrW doesn't exist in this
namespace

so search in help for ChrW under c# and find the method which says it's
under Strings.ChrW

but when I added strings. i get error that Strings isn't in namespace

in the help page Filtered by C# entering chrw in index pulls up a page
saying it's visualbasic

and the strings class is under microsoft.visualbasic namespace...but i'm
trying to do it in c# so i'm a bit confused

finally at the end of that method description it shows function defs for
diff langs

i had to enter a function def

public static char ChrW(
int CharCode
)in order to use chrw but i dont' think that should be required????also i
had to change & to + to concatenate the chrw returnwhat am i missing?thanks
mark
0 Likes
Message 4 of 5

Anonymous
Not applicable
venturing into c#? there is tons of stuff on the net.

http://dotnetperls.com/whitespace

"mp" wrote in message
news:6252744@discussion.autodesk.com...
Searching for hours in the help for c# couldn't find anything under carriage
return or line feed
Finally used reflector to look at a vb code snippet and found
ChrW(13) + ChrW(10)

as in

ed.WriteMessage(btr.Name + ChrW(13) + ChrW(10))

however when i put that in code error says ChrW doesn't exist in this
namespace

so search in help for ChrW under c# and find the method which says it's
under Strings.ChrW

but when I added strings. i get error that Strings isn't in namespace

in the help page Filtered by C# entering chrw in index pulls up a page
saying it's visualbasic

and the strings class is under microsoft.visualbasic namespace...but i'm
trying to do it in c# so i'm a bit confused

finally at the end of that method description it shows function defs for
diff langs

i had to enter a function def

public static char ChrW(
int CharCode
)in order to use chrw but i dont' think that should be required????also i
had to change & to + to concatenate the chrw returnwhat am i missing?thanks
mark
0 Likes
Message 5 of 5

Anonymous
Not applicable
Thanks to all, kerry, daniel and fieldguy!

"fieldguy" wrote in message
news:6253024@discussion.autodesk.com...
venturing into c#? there is tons of stuff on the net.

http://dotnetperls.com/whitespace

"mp" wrote in message
news:6252744@discussion.autodesk.com...
Searching for hours in the help for c# couldn't find anything under carriage
return or line feed
0 Likes