' Collection of code snippets by Arne Vajhøj 
' (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
Imports System

Namespace COM
    Public Class MainClass
        Public Shared Sub Main(args As String())
            Dim cosnat As CoS = New CoSClass()
            Dim snat As [IS] = DirectCast(cosnat, [IS])
            Dim a As Integer = 123
            Dim b As Integer = 456
            Dim c As Integer = snat.Add(a, b)
            Console.WriteLine(c)
            Dim s As String = "ABC"
            Dim s2 As String = snat.Dup(s)
            Console.WriteLine(s2)
            snat.Iv = 123
            snat.Sv = "ABC"
            snat.M()
            Dim iv As Integer = snat.Iv
            Dim sv As String = snat.Sv
            Console.WriteLine(iv & " " & sv)
        End Sub
    End Class
End Namespace
