Imports System
Imports Microsoft.VisualBasic
Namespace SystemType
Public Class [MyClass]
Public NotInheritable Class MyTestClass
End Class
Public Shared Sub Main()
Try
Dim myBool As Boolean = False
Dim myTestClassInstance As New MyTestClass()
Dim myType As Type = myTestClassInstance.GetType()
myBool = myType.IsSealed
Console.WriteLine(ControlChars.Cr + "Is {0} sealed? {1}.", myType.FullName, myBool.ToString())
Catch e As Exception
Console.WriteLine(ControlChars.Cr + "An exception occurred: {0}", e.Message.ToString())
End Try
End Sub
End Class
End Namespace