Type.IsSealed Property
.NET Framework (current version)
Gets a value indicating whether the Type is declared sealed.
Assembly: mscorlib (in mscorlib.dll)
Implements
_Type.IsSealedIf the current Type represents a type parameter of a generic type, this property always returns true.
The following example creates an instance of a sealed class, checks for the IsSealed property, and displays the result.
Public Class Example ' Declare InnerClass as sealed. Public NotInheritable Class InnerClass End Class Public Shared Sub Main() Dim inner As New InnerClass() ' Get the type of InnerClass. Dim innerType As Type = inner.GetType() ' Get the IsSealed property of InnerClass. Dim sealed As Boolean = innerType.IsSealed Console.WriteLine("{0} is sealed: {1}.", innerType.FullName, sealed) End Sub End Class ' The example displays the following output: ' Example+InnerClass is sealed: True.
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Show: