Let say I have a generic member in a class or method, so:
public class Foo { public List Bar { get; set; } public void Baz() {
Using 3dGrabber's solution:
public static T GetEnumeratedType(this IEnumerable _) { return default(T); } //and now var list = new Dictionary(); var stronglyTypedVar = list.GetEnumeratedType();