O'Reilly logo

VB.NET Language in a Nutshell, Second Edition by Steven Roman PhD, Paul Lomax, Ron Petrusha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

ControlChars Class

The Microsoft.VisualBasic namespace includes a ControlChars class whose shared fields can be used for device control and outputting special characters. Most of the shared fields also have equivalent Visual Basic intrinsic constants, as the following table shows:

Field

Value

Intrinsic constant

Back

Chr(8)

VbBack

Cr

Chr(13)

VbCr

CrLf

\r\n

VbCrLf

FormFeed

Chr(12)

VbFormFeed

Lf

Chr(10)

VbLf

NewLine

\r\n

VbNewLine

NullChar

Chr(0)

VbNullChar

Quote

Chr(34)

none

Tab

Chr(9)

VbTab

VerticalTab

Chr(11)

VbVerticalTab

Note that these constants must be qualified with the class name, as in:

If str = ControlChars.CrLf Then

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required