According to documentations, Enumerable.Range(1,10)
should return IEnumerable<int>
but IsGenericType property returns "false"! Why?!
var temp = Enumerable.Range(1, 8);
MessageBox.Show(temp.GetType().IsGenericType.ToString());
So, my question:
I want to determine whether an object is IEnumerable<T>
or not. but how can i do that with Enumarable.Range() output ? (IsArray property also gives "false")
Secondary question: How can I find its argument type (int
in this example)?
Thanks