Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Enum with 0 value not shown on Example #379

Copy link
Copy link
@DimonSmart

Description

@DimonSmart
Issue body actions

public class MyOption
{
[Option('t', "type", Required = true, HelpText = "My entity")]
public EntityType MyEntityType { get; set; }
public enum MyEntityType
{
X0, // Example for X0 is empty. If change this line to X0 =1, everything is ok
X1,
X2
}

    [Usage(ApplicationAlias = "...")]
    public static IEnumerable<Example> Examples
    {
        get
        {
            foreach (EntityType entityType in Enum.GetValues(typeof(EntityType)))
            {
                yield return new Example(entityType.ToString(), new MyOption { MyEntityType = entityType});
            }
        }
    }
}
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.