I\'m doing a heavy bit of reflection in my current project, and I\'m trying to provide a few helper methods just to keep everything tidy.
I\'d like to provide a pair
The following line
return (type is IEnumerable);
is asking "if an instance of Type, type is IEnumerable", which clearly it is not.
Type
type
IEnumerable
You want to do is:
return typeof(IEnumerable).IsAssignableFrom(type);