EnumDeclaration
A C# enum declaration
import { EnumDeclaration } from "@alloy-js/csharp";
<EnumDeclaration file internal name={string | Namekey} private protected public refkey={Refkey | Refkey[]}> {children}</EnumDeclaration>
import { EnumDeclaration } from "@alloy-js/csharp/stc";
EnumDeclaration({ file: boolean, internal: boolean, name: string | Namekey, private: boolean, protected: boolean, public: boolean, refkey: Refkey | Refkey[],}).children(children)
children | optionalChildren |
file | optionalboolean |
internal | optionalboolean |
name | string | Namekey |
private | optionalboolean |
protected | optionalboolean |
public | optionalboolean |
refkey | optionalRefkey | Refkey[] |
Example
Section titled “Example”<EnumDeclaration public name="Color"> <EnumMember name="Red" /> <EnumMember name="Green" /> <EnumMember name="Blue" /></EnumDeclaration>
This will produce:
public enum Color{ Red, Green, Blue}