I have an enum like so
public enum Colors
{
Green,
LightGreen,
Blue
}
and given a string
string substringToMatch = "Green"
I'd like to be able to retrieve all elements in my enum that contain my string as a substring efficiently - ideally even type-insensitive.
So far I've been able to find exact matches with Enum.TryParse, but haven't found a way to do substring matching as well.