' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Imports System

Module Main
    Sub Main()
        Dim i1 As Integer
        i1 = 0
        If i1 = 0 Then
            Console.WriteLine("0 = 0")
        Else
            Console.WriteLine("0 <> 0")
        End If
        If i1 = Nothing Then
            Console.WriteLine("0 Is Nothing")
        Else
            Console.WriteLine("0 Is Not Nothing")
        End If
        i1 = Nothing
        If i1 = 0 Then
            Console.WriteLine("Nothing = 0")
        Else
            Console.WriteLine("Nothing <> 0")
        End If
        If i1 = Nothing Then
            Console.WriteLine("Nothing Is Nothing")
        Else
            Console.WriteLine("Nothing Is Not Nothing")
        End If
        Dim i2 As Nullable(Of Integer)
        i2 = 0
        If i2.Equals(0) Then
            Console.WriteLine("0 = 0")
        Else
            Console.WriteLine("0 <> 0")
        End If
        If i2.Equals(Nothing) Then
            Console.WriteLine("0 Is Nothing")
        Else
            Console.WriteLine("0 Is Not Nothing")
        End If
        i2 = Nothing
        If i2.Equals(0) Then
            Console.WriteLine("Nothing = 0")
        Else
            Console.WriteLine("Nothing <> 0")
        End If
        If i2.Equals(Nothing) Then
            Console.WriteLine("Nothing Is Nothing")
        Else
            Console.WriteLine("Nothing Is Not Nothing")
        End If
    End Sub
End Module
