010010100101011010101101001010101001011101011010
Namespace
If Else
If(<expression>) Then
Imports Namespace
<statement 1>
Else
Data Types
<statement 2>
Boolean,Byte,Char,DateTime,Decimal,Double,Int16,Int32,Int64,Integer,
End If
Long, Object, Short,Single,String,IntPtr,UInteger,UintPtr
Inline If
Inline If
Variable Declaration
variable = IIf( condition, value_if_false, value_if_true )
Dim | Public | Private <variable_name> As <type>
Dim | Public | Private <variable_name> As <type>
For Loop
For <initialize> (Relational Operator) <condition>
Type Declaration
<statement>
Dim | Public <variable><suffix>
Next
Suffixes
For Each Loop
% -Integer. $ - String, @ - Decimal, & - Long, # - Double, ! - Single
For Each <variable> In <object>
For Each <variable> In <object>
[Exit For]
Arrays
<statements>
[Continue For]
Dim <arrayname>(<MaxIndexVal>) As <type>
<statements>
Dim <arrayname>(<LowerBound>
Dim <arrayname>(<LowerBound> To <UpperBound>) As <type>
Next
Initialize Array
While Loop
While Loop
Dim <arrayname>() As <type> = {<value1>, <value2>, ... , <valueN>}
While <expression>
<statement>
Change Size of Array
End While
ReDim <arrayname>(<MaxIndexVal>)
Do-While Loop
Do
Comments
<statement>
'Comment text
'Comment text
Loop While <expression>
Loop While <expression>
'No multi-line comments at this time
Select Case Statement
XML Comments
Select Case <expression>
Press the ' (apostrophe) key thrice.
Case <expression1>:
<statement sequence 1>
Case <expression2>
Line Continuation
<statement sequence 2>
strtext = “To break a long string across multiple lines, “ & _
Case <expressionN>
Case <expressionN>
“end the string, add the line continuation character “ & _
“end the string, add the line continuation character “ & _
<statement sequence N-1>
“and continue the string on the next line.”
Case Else
<statement sequence N>
Arithmetic Operators
End Select
+ (Addition), - (Subtraction), * (Multiplication), / (Division), % (Modulus)
Function Structure
<Private, Public> <Function_Name>([Parameters])
String Concatenation
body of the function
body of the function
+, &
End Function
Relational Operators
Class Structure
< (Less Than), <= (Less Than or Equal
< (Less Than), <= (Less Than or Equal To),> (Greater Than),>=
Public Class <Class_Name>
(Greater Than or Equal To),= (Equal To),<> (Not Equal To)
body of class
End Class
Logical Operators
Public
OR, NOT, AND, AndAlso, OrElse, Xor
'method_prototypes
'method_prototypes
'data_attributes
String Manipulation
Private
.Substring(<start>,[<length>])
'method_prototypes
.Trim() <trims from beginning & end of string>
'data_attributes
. . TrimEnd([<char array>])
Friend
.TrimStart([char array])
'method_prototypes
.ToLower() <to lower case>
Shared
Shared
'method_prototypes
.ToUpper() <to upper case>
'data_attributes
.Replace(<find>,<replace>)
.Equals(<expression>) <6 available overloads>
Error Handling
.Contains(<string>)
Try
.Join(<seperator>,<value>,[<count>])
.Join(<seperator>,<value>,[<count>])
<statements that may cause an error>
.Compare(<string1>,<string2>,[<ignore case>]) <7 overloads available>
Catch
.Copy(<string>)
<statements to use when an error occurs>
<statements to use when an error occurs>
Finally
<statements to use no matter what happens>
End Try
Download More Reference Sheets & Get Programming Help @
Edited By: born2c0de, Louisda16th, PsychoCoder, TophCoder
Published: August 18, 2007