Knowledge of Dim
For all the coding language I know, Variables is a must. It helps everything go smoothly, and thats what Dims are in Vb.Net, it represents Variables.
Now their are different types of Dims, and I will explain them all.
Now the basic dim is the string
Or
You can also dim the sting using a textbox like
Now you might think its not that useful but it is, lets take this for example. We want to put the Date in a message box, you cant just put
You will get an error, so what you do is this
Giving it no error.
Now we have strings down, and custom Values, lets get to the rest.
Boolean
Boolean is a value of only True or False, an example would be
String
String is just words, a sentence, or a phrase. An example is above and below.
Byte
a Byte is an 8 bit unsigned integer, meaning its a data value, and a number.
Char
Char is a variable type. It can hold one character at a time (the Char is short for Character).
DateTime
DateTime is also a Var type, this one you can go here for all the unique types.
Decimal
Decimals is numbers that aren't full, like 3.24. If you where to use a string for 3.24 it would just read it as 3, and not the full decimal.
Dim myVar as <data type goes here>
There are afew more but these are the most commonly used. Hope you get the knowledge of Dims now.
Now their are different types of Dims, and I will explain them all.
Now the basic dim is the string
Code:
Dim Var1 as String Var1 = "Hello"
Code:
Dim Var1 as String = "Hello"
Code:
Dim Var1 as String Var1 = Textbox1.text
Code:
MsgBox(DateTime = Today())
Code:
Dim TodayDate As DateTime = Today()
MsgBox(TodayDate)
Now we have strings down, and custom Values, lets get to the rest.
Boolean
Boolean is a value of only True or False, an example would be
Code:
Dim a As Boolean = True
String is just words, a sentence, or a phrase. An example is above and below.
Code:
Dim Sti as String Sti = "Hello There world!"
a Byte is an 8 bit unsigned integer, meaning its a data value, and a number.
Code:
Dim fileData As Byte
Char is a variable type. It can hold one character at a time (the Char is short for Character).
Code:
Dim OneCharacter As Char OneCharacter = "A"
DateTime is also a Var type, this one you can go here for all the unique types.
Code:
Dim TodayDate As DateTime = DateTime.Now
MsgBox(TodayDate)
Decimals is numbers that aren't full, like 3.24. If you where to use a string for 3.24 it would just read it as 3, and not the full decimal.
Code:
Dim Dec as Decimal Dec = 3.24
Dim myVar as <data type goes here>
There are afew more but these are the most commonly used. Hope you get the knowledge of Dims now.
