C# TypeInfo IsSealed
Description
TypeInfo IsSealed
Gets a value indicating whether the
Type is declared sealed.
Syntax
TypeInfo.IsSealed
has the following syntax.
public bool IsSealed { get; }
Example
using System;// www. ja va2s . c o m
public class MyClass
{
sealed public class MyTestClass
{
}
public static void Main(string[] args)
{
MyTestClass myTestClassInstance = new MyTestClass();
Type myType = myTestClassInstance.GetType();
bool myBool = myType.IsSealed;
Console.WriteLine("\nIs {0} sealed? {1}.", myType.FullName, myBool.ToString());
}
}
The code above generates the following result.