C# TypeInfo IsContextful
Description
TypeInfo IsContextful
Gets a value indicating whether
the Type can be hosted in a context.
Syntax
TypeInfo.IsContextful
has the following syntax.
public bool IsContextful { get; }
Example
using System;// w ww . java2 s . c o m
using System.Runtime.Remoting.Contexts;
public class MyContextBoundClass: ContextBoundObject
{
public string myString = "This class demonstrates the IsContextful.";
}
public class MyTypeDemoClass
{
public static void Main()
{
Console.WriteLine ("The IsContextful property for the {0} type is {1}.", typeof(MyTypeDemoClass).Name, typeof(MyTypeDemoClass).IsContextful);
Console.WriteLine ("The IsContextful property for the {0} type is {1}.", typeof(MyContextBoundClass).Name, typeof(MyContextBoundClass).IsContextful);
}
}
The code above generates the following result.