Wednesday 23 January 2013

Vb.net If Statements

VB.Net If Statements

Example:

Dim X As Boolean = False

If X = False Then
Stop
Else
Exit Sub
End If

Dim Y As Long = 0

If Y = 0 Then
Stop
End If

Dim Z As DataBase = Nothing

If Z Is Nothing Then ' Answer is True.
Stop
End If

Dim L As Integer = 2

If L = 1 Or L = 2 Then ' Answer is True. Because L is 2
Stop
End If

Dim P As Long = 1

If P <> 0 Then
' True
End if

Dim O As Long = 9

If O >= 9 Then
' True
End If

No comments:

Post a Comment