Imports System
Imports System.Runtime.Remoting.Contexts
Imports Microsoft.VisualBasic
Public Class MyContextBoundClass
Inherits ContextBoundObject
Public myString As String = "test."
End Class
Public Class MyTypeDemoClass
Public Shared Sub Main()
Try
Console.WriteLine("The Contextful property for the {0} type is {1}.", GetType(MyTypeDemoClass).Name, GetType(MyTypeDemoClass).IsContextful.ToString())
Console.WriteLine("The Contextful property for the {0} type is {1}.", GetType(MyContextBoundClass).Name, GetType(MyContextBoundClass).IsContextful.ToString())
Catch e As Exception
Console.WriteLine("An exception occurred: " + e.Message.ToString())
End Try
End Sub
End Class