I have an enum that,
public enum Region {
euw,
na,
br,
lan,
ru,
oce,
tr,
jap,
}
The thing is that I would like to show the first 7 elements, or what is the same, all except the last one.
Currently with
comboBox1.DataSource = Enum.GetValues(typeof(RiotSharp.Misc.Region));
I can show the 8 elements in the comboBox, in order to show the first 7 I tried the following:
comboBox1.DataSource = Enum.GetValues(typeof(RiotSharp.Misc.Region)).Cast<RiotSharp.Misc.Region>().Where(ejemplo => 7 >= (int)ejemplo);
But he sends me the following warning:
How could I solve it?