' 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) 
Module Program
    Public Class Foo
        Public Dim v As Integer
    End Class
    Public Structure Bar
        Public Dim v As Integer
    End Structure
    Sub Main()
        Dim f As Foo = New Foo
        f.v = 123
        Console.WriteLine(f.v)
        With f
            .v = 456
        End With
        Console.WriteLine(f.v)
        Dim ftmp As Foo = f
        ftmp.v = 789
        Console.WriteLine(f.v)
        Dim b As Bar = New Bar
        b.v = 123
        Console.WriteLine(b.v)
        With b
            .v = 456
        End With
        Console.WriteLine(b.v)
        Dim btmp As Bar = b
        btmp.v = 789
        Console.WriteLine(b.v)
    End Sub
End Module
