I have this code:
public enum MyEnum
{
First = 6,
Data1 = 6,
Data2 = 7,
Data3 = 8,
Data4 = 9,
Data5 = 10,
Last = 10,
Invalid = -1
};
Enumerable<int> _myTypes = Enumerable.Range((int)MyEnum.First, (int)MyEnum.Last);
This creates an enumerable with elements from 6 to 15. I have equivalent code starting with 1 and it works as expected. This seems like a bug or very strange to me.