Type.IsSealed Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets a value indicating whether the Type is declared sealed.
Assembly: mscorlib (in mscorlib.dll)
If 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 NotInheritable Class Example Public Shared Sub Demo(ByVal outputBlock As System.Windows.Controls.TextBlock) Dim t As Type = GetType(Example) outputBlock.Text &= _ String.Format("Is class {0} NotInheritable? {1}." & vbLf, _ t.Name, t.IsSealed) End Sub End Class ' This example produces the following output: ' 'Is class Example NotInheritable? True.
Show: