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

Imports System

Namespace COM
    Public Class MainClass
        Public Shared Sub Main(args As String())
            Dim sdn As Object = Activator.CreateInstance(Type.GetTypeFromProgID("COM.SDN"))
            Dim a As Integer = 123
            Dim b As Integer = 456
            Dim c As Integer = sdn.Add(a, b)
            Console.WriteLine(c)
            Dim s As String = "ABC"
            Dim s2 As String = sdn.Dup(s)
            Console.WriteLine(s2)
            sdn.Iv = 123
            sdn.Sv = "ABC"
            sdn.M()
            Dim iv As Integer = sdn.Iv
            Dim sv As String = sdn.Sv
            Console.WriteLine(iv & " " & sv)
        End Sub
    End Class
End Namespace
