IEnumerable<T> (or List<T>, or T[]) to IEnumerable (non-generic, ie. no type param)?
Hello,
I'm working on some code that takes an
I'm working on some code that takes an
object that may be either an object T itself, or some form of an IEnumerable<T>. The thing is, I don't actually know T in this context (as it's a asp.net IActionFilter). How would I check if that object is an IEnumerable and if it is, get the object as that IEnumerable to iterate over it?