"\n" in C#, in VB.NET ?????

Hi there!!

I want to use the equivelent of "\n" in java .. so that code will take me to the next line. i try to do this in VB and found more than one key word I found "ControlChars.NewLine" and "ControlChars.CrLf".. Can you please tell me what is the difference and which one is the right conversion of the java or C#
Thank you for reading this message
Fadil Alnassar
www.fadilalnassar.com | FREE Nodil Tab Control
http://www.mefranchising.com
0
fadil1977
11/3/2004 2:25:22 PM
asp.net.web-forms 93655 articles. 6 followers. Follow

2 Replies
1095 Views

Similar Articles

[PageSpeed] 23
Get it on Google Play
Get it on Apple App Store

In VB.NET, vbcrlf (Carriage return line feed) should do the job.

CR is for Carriage return; the ascii \r character. Also used as a synonym for the `Return' or `Enter' key used to terminate a line of text.
LF is the line feed which directs next character to be printed or displayed on the next line.
ControlChars.NewLine is more of a generic solution in case other platform has a different new line character. A list of VB.NET constants could be found here [1].
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbgrfVBAConstantChangesInVisualBasicNET.asp

-Adnan Masood
MCSD.NET, MCAD.NET, MCP
www.DotNetSmith.com
"Beware of bugs in the above code; I have only proved it correct, not tried it" - Donald Knuth
0
adnano
11/3/2004 6:34:03 PM

Enviroment.NewLine

is language independent.
Regards

Andre Colbiornsen
---------------------------------
Seventh Day
Råbygatan 1A,
SE-223 61 Lund
Sweden
Mob.: +46-(0)708-97 78 79
Mail: info@seventhday.se
--------------------------------
0
adec
11/3/2004 6:39:07 PM
Reply:

Similar Artilces:

C#.Net "Double" and "double" When/Where to use?
Hi all     Please let me know the difference between "Double" and "double" in c#.Net (I understand that "Double" is structure      and "double" is an instance to that structure) differences if any thing else.     Also the context in which both has been used.(When/Where to use both). thanks all...      hi,my brains says Double is reference type & double is value type.regards,satishKind Attn: If a reply to your post helped you, kindly mark it as Answered.__________...

Sending SMS using vb.net or C#.net using vb.net or c#.net
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

"\r\n\r\n" or "\n\n" or "\r\n" or "\n"... What is the term / name for this?
------=_NextPart_000_0011_01C353E5.0AE4D150 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: quoted-printable ------=_NextPart_000_0011_01C353E5.0AE4D150-- ...

Does VB.NET have a C# like "using" statement?
I noticed that C# includes a "using" statement that "wraps" a declaredvariable for a specified block and will automatically call the "Dispose"method for that object when the variable leaves the block.Is there a similar statement in VB.NET. If not, does anyone know if thereare plans for it? Hi, this new keyword for VB.NET Using, was introduced in the .NET 2.0 framework. Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Workaround for non working Mark as answer buttons. just figured it out , thanks anyway......

VB.NET ":=" ?
 Hi, what is this operator, ":=" ? I found it has something to do with "expression" , but not sure how to use it. I googled and didn't find any information.  Here you go: http://msdn.microsoft.com/en-us/library/51wfzyw0(VS.71).aspxThanks, EdMicrosoft MVP - ASP/ASP.NET...

Developed C#.net WebService 1.1 for Client C#.net 1.1. Getting error "Server was unable to process the Request" Pls Help
Hi., I developed Microsoft C#.net Web Services2003 for the Client Application C#.net 2003. When it runs in 5 machines it gives good performance and has no errors. But if i run the same application in about 80 client machines. Getting error "Server was unable to process the request". I use Sql Server 2005 as my database. I get error even when i login at a time for about 25 users. Tried modifying machine.config too. But went unsuccessful. Live Server is 2003 using IIS 6.0 I use very expensive data handling.  Its very urgent pls help. Have to post in Live Server. Thank u., ...

Hide "NET USE" C:\Windows\System32\net.exe prompt
--____HXVYWAWXUSKEVXKBAEOI____ Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable On our logon script I'm currently mapping NetWare shares using the MAP = command and Windows shares using the NET USE command. Everything is = working fine and well its just that I'd like to completely hide the = windows command prompt box at login. Close as I've come to a recommendation= was to minimize it but not to completely hide it. as a example of what I'm currently doing: @CMD /C START /M NET USE R: = \\servername\sharename "@C...

RE: "\r\n\r\n" or "\n\n" or "\r\n" or "\n"... What is the term / name for this?
Escape characters that refer to: \r = carriage return \n = newline -----Original Message----- From: LI NGOK LAM [mailto:perl@reborn.org] Sent: Saturday, July 26, 2003 02:16 PM To: beginners@perl.org Subject: "\r\n\r\n" or "\n\n" or "\r\n" or "\n"... What is the term / name for this? Does anyone have a code snippet or a module for converting the IIS log = file format to NCSA Common? Cheers, Nigel ...

Programmatically Populating the "mail.settings" section of "system.net" in web.config
I am fully aware that the system.net section of web.config typically looks something like this:  <system.net>    <mailSettings>      <smtp from="noreply@sample.com">        <network host="smtp_server_address" userName="myUsername" password="myPassword" />      </smtp>    </mailSettings>  </system.net>If web.config is so populated then this info is used for sending e-mails generally and al...

Calling A VB.NET Function in TextBox1.Attributes.Add("OnKeyUp", "search_log()")
Please tell me where i am wrong.  I am trying to call a vb.net function in attributes.add("OnKeyUp", "search_log()")   Function search_log() some codes here End Function   There is an error that "object expected"   Please Help JavaScript can not call a function that is serverside code. It can only call JavaScript code. If you want to call code on the server, you should ook into using the Ajax controls. Eric Pascarello.com | Twitter epascarello | LinkedIn Hi, I suggest you use pagemethod. For more infomation, see http...

window.alert(array.join("\n") c#.net
i have a string array containing string[] games = new string[4]; games[0] = "Football"; games[1] = "Cricket"; games[2] = "Cycling"; games[3] = "Boxing"; i want to display all this values in a alert box.im using c#.net i tried by using string strScript; strScript = "<script>"; //strScript = strScript + "var myA = new Array(10,11,12)"; strScript = strScript + "alert(games.join('\n');"; strScript = strScript + "</script>"; Page.RegisterClientScriptBlock("ClientScript", strScript); and Response.Write("<script>window.alert( games.join("\n")</script>"...

window.alert(array.join("\n") c#.net #2
i have a string array containing string[] games = new string[4]; games[0] = "Football"; games[1] = "Cricket"; games[2] = "Cycling"; games[3] = "Boxing"; i want to display all this values in a alert box.im using c#.net i tried by using string strScript; strScript = "<script>"; //strScript = strScript + "var myA = new Array(10,11,12)"; strScript = strScript + "alert(games.join('\n');"; strScript = strScript + "</script>"; Page.RegisterClientScriptBlock("ClientScript", strScript); and  also i tried like this Response.Write("<script>window.alert( game...

LastIndexOf("/"c) -- what is "c" ?
I'm trying to convert some VB to C#, and ive run into a small problem due to my lack of experience with VB..... below is the VB code: ************************ Dim s As String = entry.Name.ToLower Dim i As Integer = s.LastIndexOf("/"c) ************************ on the 2nd line, at the end, it has the "/"c ...... what is the "c" there for? the "literal conversion" to C# of the above is this: ************************ string s = entry.Name.ToLower(); int i = s.LastIndexOf("/"c); ************************ but tha...

about "\r\n" or "\n"
Hello,=0A=0AI created a script for checking HTTP like below:=0A=0Ause stric= t;=0Ause IO::Socket;=0A=0Amy $host =3D shift || '127.0.0.1';=0Amy $port =3D= shift || 80;=0A=0Amy $sock=3DIO::Socket::INET->new(PeerAddr =3D> $host,=0A= PeerPort =3D> $port,=0A = Proto =3D> 'tcp');=0Aunless (defined $sock) {=0A exit -1;=0A}= =0A=0A=0Aprint $sock "GET / HTTP/1.0\n\n";=0A=0A...=0A=0AFor above line, if= the remote server OS is Windows, should I send "GET / HTTP/1.0\r\n\r\n" in= stea...

Web resources about - "\n" in C#, in VB.NET ????? - asp.net.web-forms

Resources last updated: 12/12/2015 2:46:57 PM