Skip to content

Add a parse static or factory ctor to Enum #33244

@kevmoo

Description

@kevmoo

C# has it: https://docs.microsoft.com/en-us/dotnet/api/system.enum.parse?view=netframework-4.7.2

The opposite of #30021 & https://github.com/dart-lang/sdk/issues/21712 – where we want the simple string name of the value.

Related to #21966 as this makes interop VERY hard. Have to do a lot of messy string tricks

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).core-ntype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions