No, it is, by far, not redundant.
If you open a text file, type something, save,
and look at the file size, then add a new line
by pressing Enter, you will notice, that file size
increases by 2, not by 1.
\r is caret return
\n is a new line
if one of them is missing, the file may open properly
in one environment, but in another, you will see
some crap (boxes or smth like that) at the end of lines...
It is necessary.
The best way to go is:
<code>
string NewLine=System.Environment.NewLine;
String strCmd = "";
strCmd = strCmd + "CREATE PROCEDURE GetAllModels2" + NewLine;
strCmd = strCmd + "AS";
strCmd = strCmd + "BEGIN" + NewLine;
strCmd = strCmd + "SELECT * FROM tblModels" + NewLine;
strCmd = strCmd + "END" + NewLine;
strCmd = strCmd + "GO";
</code>
And don't you need a new line or a space after "AS"?
On Sat, 15 Jan 2005 23:56:15 +0100, Teis Draiby
<te*************@draiby.com> wrote:
What is the reason that you normally use \r\n rather than always \n.
Isn't
that kindof... redundant?
Teis
"yyy" <ma******@bezeqint-dot-net.no-spam.invalid> wrote in message
news:41**********@Usenet.com... Try it with just "\n"
*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
--
Regards,
Nurchi BECHED