On the Windows platform, Environment.NewLine yields a carriage return AND a
line feed, so it wouldn't be equivalent to VB's Chr(13). It'd be equivalent
to vbCrLf.
As info to the OP, "\n" is a line feed (newline), so on Windows,
Environment.NewLine == "\r\n";
For just a carriage return, you would embed \r into the string, e.g.
'VB
string = "Foo" & Chr(13) & "Bar"
//C#
string s = "Foo\rBar";
//or
string s = String.Format("Foo{0}Bar","\r");
//or
string s = "Foo" + "\r" + "Bar";
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.