September 10th, 2009, 07:05 PM
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
All help greatly appreciated
September 10th, 2009, 07:07 PM
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, 07:08 PM
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, 07:17 PM
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, 08:01 PM
vbCrLf is the same as Chr$(13) & Chr$(10) (which does the same thing)
September 10th, 2009, 08:53 PM
I tried environment.newline and it worked like a charm .. thank you all so very much I really appreciate it.
September 10th, 2009, 09:47 PM
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).
Originally Posted by dglienna
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!