Represents one case of a union, reached through Cases.
Namespace: Metalama.Framework.Code.Types
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
[InternalImplement]
public interface IUnionCaseRemarks
A case is more than its type. The compiler reports the case types of a union as a set, so two cases never have the same type and Index cannot be recovered from Type. The member that creates a value of the case is a constructor for one authoring form and a static method for another, so it cannot be derived from the type either.
Properties
| Name | Description |
|---|---|
| CreationMember | Gets the member that creates a value of the case: the constructor that the compiler synthesizes for a union
declaration, the public single-parameter constructor of the attribute form, or the static |
| Index | Gets the zero-based index of the case, in the order in which Cases reports the cases. |
| Type | Gets the type of the case, which is an ordinary type declared elsewhere. A union declaration names it in its header, and no type is declared by the case itself. |