ICompositeType.PrimaryConstructor Property
- Namespace
- Kampute.DocToolkit.Metadata
- Assembly
- Kampute.DocToolkit.dll
Definition
Gets the primary constructor of the type if it is a positional record.
IConstructor PrimaryConstructor { get; }This property has a default implementation in the interface.
Property Value
- IConstructor
- The constructor whose parameters form the parameter list of the record declaration, or
nullif the type is not a positional record or its primary constructor cannot be identified.

Deconstructmethod that the compiler synthesizes for a positional record. Therefore, this property isnullfor a record without a parameter list, and for a positional record whoseDeconstructmethod is declared in source code.