Section 5.4. Strings

   

5.4 Strings

It is nearly impossible to write a VB.NET program without creating strings. A string object holds a series of characters .

You declare a string variable using the string keyword much as you would create an instance of any type:

 Dim myString As String 

You specify a string literal by enclosing it in double quotes:

 "Hello World" 

It is common to initialize a string variable that contains a string literal:

 Dim myString As String = "Hello World" 

Strings are covered in much greater detail in Chapter 16.

   


Learning Visual Basic. NET
Learning Visual Basic .Net
ISBN: 0596003862
EAN: 2147483647
Year: 2002
Pages: 153
Authors: Jesse Liberty

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net