If I understand correctly, your list has the same type parameter as the container class itself. If this is the case, then:
Type typeParameterType = typeof(T);
If you are in the lucky situation of having object
as a type parameter, see Marc’s answer.
More Related Contents:
- Pass An Instantiated System.Type as a Type Parameter for a Generic Class
- In C#, why can’t a List object be stored in a List variable
- ArrayList vs List in C#
- Why isn’t there generic variance for classes in C# 4.0?
- Does .NET have a way to check if List a contains all items in List b?
- Making a generic property
- foreach vs someList.ForEach(){}
- Why cannot C# generics derive from one of the generic type parameters like they can in C++ templates? [duplicate]
- How do I implement IEnumerable
- No type inference with generic extension method
- Passing a single item as IEnumerable
- How do I make the return type of a method generic?
- explicitly cast generic type parameters to any interface
- Anonymous Types – Are there any distingushing characteristics?
- Generics: casting and value types, why is this illegal?
- Generic List – moving an item within the list
- C# Generic Type Inference With Multiple Types
- Why generic IList does not inherit non-generic IList
- Declare a generic type instance dynamically [duplicate]
- T must be contravariantly valid
- Why can’t I assign a List to a List?
- List readonly with a private set
- Mocking generic methods in Moq without specifying T
- Why doesn’t C# support implied generic types on class constructors?
- What’s Wrong with an ArrayList?
- .NET Casting Generic List
- The component does not have a resource identified by the uri
- How does a generic constraint prevent boxing of a value type with an implicitly implemented interface?
- How to make correct clone of the List? [duplicate]
- C# generic methods, type parameters in new() constructor constraint