Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
As in VB 6, VB 2005 String types are used to represent text and are a good example of a reference type, as you saw in "Variables," earlier in this chapter. Strings in .NET are immutable, which means that once you've assigned a value to a string variable, it cannot be changed. If the value of a string variable is changed, another string object is created during runtime. Consider this example:
Dim st As String st = "Hello" st &= " World!" MsgBox(st) ' prints "Hello World!"