June 2003
Intermediate to advanced
800 pages
34h 20m
English
You need to insert a line break or tab character in a string, typically for display purposes.
Use the NewLine property of the System.Environment class, or use the global vbTab and vbNewLine constants.
Visual Basic .NET provides three equivalent approaches for inserting line breaks. It’s most common to use the System.Environment class, which provides a NewLine property that returns the new line character for the current platform:
Dim MyText As String MyText = "This is the first line." MyText &= Environment.NewLine MyText &= "This is the second line."
However, the System.Environment class doesn’t provide a property for tabs. Instead, you can use the traditional Visual Basic-named constants vbNewLine ...
Read now
Unlock full access