Type.IsSealed Property  
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value indicating whether the Type is declared sealed.
public:
 property bool IsSealed { bool get(); };public bool IsSealed { get; }member this.IsSealed : boolPublic ReadOnly Property IsSealed As BooleanProperty Value
true if the Type is declared sealed; otherwise, false.
Implements
Examples
The following example creates an instance of a sealed class, checks for the IsSealed property, and displays the result.
using System;
 public class Example
 {
     // Declare InnerClass as sealed.
     sealed public class InnerClass
     {
     }
     public static void Main()
     {
          InnerClass inner = new InnerClass();
          // Get the type of InnerClass.
          Type innerType = inner.GetType();
          // Get the IsSealed property of  innerClass.
          bool isSealed = innerType.IsSealed;
          Console.WriteLine("{0} is sealed: {1}.", innerType.FullName, isSealed);
     }
}
// The example displays the following output:
//        Example+InnerClass is sealed: True.
module Example
// Declare InnerClass as sealed.
[<Sealed>]
type InnerClass() = class end
let inner = InnerClass()
// Get the type of InnerClass.
let innerType = inner.GetType()
// Get the IsSealed property of  innerClass.
let isSealed = innerType.IsSealed
printfn $"{innerType.FullName} is sealed: {isSealed}."
// The example displays the following output:
//        Example+InnerClass is sealed: True.
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.
Remarks
If the current Type represents a type parameter of a generic type, this property always returns true.