Home » VB.NET Basics » 05 - Strings
5

Text Variables

Differences between text and numerical variables

Text Variables

String variables are an entirely different form of variables. As you may have noticed, all the other variables that were mentioned in the previous chapter have something to do with numbers. String variables deal with text. When you deal with text variables, the commands and the methods associated with them are entirely different. For example, when was the last time that you have heard someone multiply letters? What is the result when you multiply the letter "k" with the letter "n" ? When you work with text variables or string variables, make sure that you do not confuse the numerical manipulation commands with the string or textual manipulation commands.

www.babynamesworld.com, Naming your baby gives your baby a sense of being special. You have full jurisdiction on the name that you will give to your baby. Imagine a world where people had no names and were merely identified by numbers. "Hi, I'm 349988272, what's your's?"

Declaring the Text Variable or the String Variable

Simply type in the code below to declare a string variable in your program.


Dim Jordan as String

OR


Dim [name of variable] as String