-
September 10th, 2009, 06:05 PM
#1
Vbcr
Being required to do everything the ".NET" way ... I was told that vbcr is soon going to be deprecated and is to be replaced by something else in the future ... anyhow even if vbcr does the job done for some reason they want the change now... they said we cannot use vbcr, vbcrlf,
vbnewline ... and then when asked what then do we use? They say just go search ...
I searched and all I can see is that the whole world seems to be still using vbcr ... they said MSDN
has it but I end up going around in circles
Any ideas?
All help greatly appreciated
Thanks,
Matt
-
September 10th, 2009, 06:07 PM
#2
Re: Vbcr
They also mentioned that we cannot use \n escape sequence either (I dont know how to use that anyway in vb.net or if it is even possible) .. LOL
-
September 10th, 2009, 06:08 PM
#3
Re: Vbcr
Those are VB6 keywords, deprecated into the new language. I doubt that will drop anytime soon, but there's no reason to use them.
Take out the reference to the VB6 Runtime, and correct the errors. There is a newline command, and you can use string format commands
-
September 10th, 2009, 06:17 PM
#4
Re: Vbcr
You were told wrong...
For instance, 'Constants.vbTab' has no other sensible equivalent, unless you want a character - in that case it's 'ControlChars.Tab'.
As dglienna said, you might want to use Environment.Newline, but in general the VB equivalents to the standard C-style control characters are the ones in the Constants class or the ControlChars class, both in the Microsoft.VisualBasic assembly.
-
September 10th, 2009, 07:01 PM
#5
Re: Vbcr
vbCrLf is the same as Chr$(13) & Chr$(10) (which does the same thing)
-
September 10th, 2009, 07:53 PM
#6
Re: Vbcr
I tried environment.newline and it worked like a charm .. thank you all so very much I really appreciate it.
Matt
-
September 10th, 2009, 08:47 PM
#7
Re: Vbcr
Originally Posted by dglienna
vbCrLf is the same as Chr$(13) & Chr$(10) (which does the same thing)
That's why they came up with the Constants and ControlChars classes - this is a step forward from remembering the numbers (which you had to do in VB3 I believe).
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|