Open sandboxFocus

Enum ConstructorInitializerKind

Describes the kind of constructor initializer. A constructor initializer is the optional : base(...) or : this(...) clause that appears after the constructor parameter list and invokes another constructor before the current constructor body executes.

Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public enum ConstructorInitializerKind
Remarks

For example, in public MyClass() : base(42) { }, the : base(42) part is a constructor initializer of kind Base.

In public MyClass(int x) : this() { }, the : this() part is a constructor initializer of kind This.

Fields

Name Description
Base

The constructor has a : base(...) initializer that invokes a constructor of the base class.

None

The constructor has no explicit initializer (no : base(...) or : this(...) clause). The C# compiler implicitly calls the parameterless base class constructor.

This

The constructor has a : this(...) initializer that invokes another constructor of the same type.

See Also