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";
--Bob
firebalrog said:
Use the following.
System.Environment.NewLine