泛型与反射

TypeToString()ContainsGenericParametersGenericParameterAttributesGenericParameterPositionIsGenericType
Dictionary<,> Dictionary`2[TKey,TValue] Y - - Y
< Tkey Y None 0 N
> Tvalue Y None 1 N
Dictionary<string,int> Dictionary`2[String,Int32] N - - Y
<string String N - - N
int> Int32 N - - N
TypeIsGenericParameterIsGenericTypeDefinitionGetGenericArguments()GetGenericParameterConstraints()GetGenericTypeDefinition()
Dictionary<,> N Y [TKey,TValue] - Dictionary`2[TKey,TValue]
< Y N [] [] -
> Y N [] [] -
Dictionary<string,int> N N [String,Int32] - Dictionary`2[TKey,TValue]
<string N N [] - -
int> N N [] - -
原文地址:https://www.cnblogs.com/deerchao/p/1222936.html