I need to return only the values from 1 omitting the Ant
public enum AnimalCodeType
{
Ant = 0,
Koala = 1,
Panda = 2,
}
The below code gets me all values.. How do I change it
return Enum.GetValues(typeof(AnimalCodeType)).Cast<AnimalCodeType>().Select(v => v.ToString()).ToList();
return Enum
.GetValues( typeof(AnimalCodeType) )
.Cast<AnimalCodeType>()
.Where( v => (int)v > 0 )
.Select( v => v.ToString() )
.ToList();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With