Sub Process_Globals
Type t1(memberX As String)
Type t2(memberY As String)
End Sub
Sub AppStart (Args() As String)
Dim vt1 As t1
Dim vt2 As t2
xLogType(vt1)
xLogType(vt2)
'StartMessageLoop
End Sub
Sub xLogType(o As Object)
Select GetType(o)
Case isType("t1")
Log("its t1")
Case isType("t2")
Log("its t2")
Case Else
Log("unknown")
End Select
End Sub
Sub isType(s As String) As String ' the name of the class of type t1 t2 etc MUST be in this module in globals
Dim ret As String = Me ' get this class name
Return ret.Replace("class ","")&"$_"&s ' add the type class name eg b4j.example.main$_typeclass
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub