I have a set of enums
public enum SyncRequestTypeEnum
{
ProjectLevel=1,
DiffSync=2,
FullSync=3
}
I want to display these enums in a drop down list except ProjectLevel. Can I get these details using linq? Can someone help on this?
Maybe something like this:
var result = Enum
.GetValues(typeof(SyncRequestTypeEnum))
.Cast<SyncRequestTypeEnum>()
.Where(w =>w!=SyncRequestTypeEnum.ProjectLevel)
.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