-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Hi,
I'd like to ask for a change in the enum type ordering of the members.
Currently as I see, it's ordered alphabetically, but when searching for stuff, I'd want to retrieve items by priority.
For example, I want to retrieve all the facts of a person related to birth or death. Meaning all the facts that have a KnownType which is Death, Funeral, Burial etc., selecting the first significant one that's available, in this case, Death should come before Burial, but since its ordered alphabetically it's not.
Here's example code:
_Death = Person.Facts
.OrderBy(f => f.KnownType) //Since Burial comes before Death, it will return it first.
.FirstOrDefault(f => f.KnownType == FactType.Death || f.KnownType == FactType.Funeral);
I'm new to this repo and don't know how strict things are here about pull requests, so I'm just talking out. Meanwhile I'm gonna use a custom IComparer<KnownType>.
Metadata
Metadata
Assignees
Labels
No labels