Variable-length strings
Variable-length strings are one of the most commonly used data types in Visual Basic. You define a variable-length string using Visual Basic's Dim statement:
Dim MyStr as String
Once a string variable is declared, you can assign values to it. The string will shrink or expand to accommodate the assigned values. As with any other BString, Visual Basic's variable-length strings are null terminated, and contain a header with the length of the string.