Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes how to define constructors for PowerShell classes.
Locale: en-US
ms.date: 11/13/2023
ms.date: 10/22/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_classes_constructors?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Classes_Constructors
Expand Down Expand Up @@ -393,8 +393,11 @@ For classes that don't inherit from another class, the ordering is:

For derived classes that inherit from another class, the ordering is:

1. The static constructor for the base class.
1. The static constructor for the derived class.
1. If the static constructor of the derived class doesn't depend on the base
class, the static constructor of the derived class is called first.
1. If the static constructor of the derived class depends on the base class,
the static constructor of the base class is called before executing the line
of code in the derived class that depends on base.
1. If the derived class constructor explicitly calls a base constructor
overload, it runs that constructor for the base class. If it doesn't
explicitly call a base constructor, it runs the default constructor for the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes how to define constructors for PowerShell classes.
Locale: en-US
ms.date: 10/13/2025
ms.date: 10/22/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_classes_constructors?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Classes_Constructors
Expand Down Expand Up @@ -392,8 +392,11 @@ For classes that don't inherit from another class, the ordering is:

For derived classes that inherit from another class, the ordering is:

1. The static constructor for the base class.
1. The static constructor for the derived class.
1. If the static constructor of the derived class doesn't depend on the base
class, the static constructor of the derived class is called first.
1. If the static constructor of the derived class depends on the base class,
the static constructor of the base class is called before executing the line
of code in the derived class that depends on base.
1. If the derived class constructor explicitly calls a base constructor
overload, it runs that constructor for the base class. If it doesn't
explicitly call a base constructor, it runs the default constructor for the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes how to define constructors for PowerShell classes.
Locale: en-US
ms.date: 10/13/2025
ms.date: 10/22/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_classes_constructors?view=powershell-7.5&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Classes_Constructors
Expand Down Expand Up @@ -392,8 +392,11 @@ For classes that don't inherit from another class, the ordering is:

For derived classes that inherit from another class, the ordering is:

1. The static constructor for the base class.
1. The static constructor for the derived class.
1. If the static constructor of the derived class doesn't depend on the base
class, the static constructor of the derived class is called first.
1. If the static constructor of the derived class depends on the base class,
the static constructor of the base class is called before executing the line
of code in the derived class that depends on base.
1. If the derived class constructor explicitly calls a base constructor
overload, it runs that constructor for the base class. If it doesn't
explicitly call a base constructor, it runs the default constructor for the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes how to define constructors for PowerShell classes.
Locale: en-US
ms.date: 10/13/2025
ms.date: 10/22/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_classes_constructors?view=powershell-7.6&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Classes_Constructors
Expand Down Expand Up @@ -392,8 +392,11 @@ For classes that don't inherit from another class, the ordering is:

For derived classes that inherit from another class, the ordering is:

1. The static constructor for the base class.
1. The static constructor for the derived class.
1. If the static constructor of the derived class doesn't depend on the base
class, the static constructor of the derived class is called first.
1. If the static constructor of the derived class depends on the base class,
the static constructor of the base class is called before executing the line
of code in the derived class that depends on base.
1. If the derived class constructor explicitly calls a base constructor
overload, it runs that constructor for the base class. If it doesn't
explicitly call a base constructor, it runs the default constructor for the
Expand Down