Let say I have a generic member in a class or method, so:
public class Foo { public List Bar { get; set; } public void Baz() {
That's work for me. Where myList is some unknown kind of list.
IEnumerable myEnum = myList as IEnumerable; Type entryType = myEnum.AsQueryable().ElementType;