Open sandboxFocus

Method MustNotBePrimaryConstructorOfNonRecordType

MustNotBePrimaryConstructorOfNonRecordType(IEligibilityBuilder<IConstructor>)

Forbids the target constructor from being a primary constructor of a class or a struct (C# 12.0).

Declaration
public static void MustNotBePrimaryConstructorOfNonRecordType(this IEligibilityBuilder<IConstructor> eligibilityBuilder)
Parameters
Type Name Description
IEligibilityBuilder<IConstructor> eligibilityBuilder