Will IsConstructedGenericType always be the negation of IsGenericTypeDefinition, for a generic type?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: The documentation of the instance property Type.IsConstructedGenericType is unclear or misleading. I tried the following code to find the actual behavior of this and related properties: // create list of types to use later in a Dictionary<,> var li = new List < Type >(); // two concrete types: li . Add ( typeof ( int )); li . Add ( typeof ( string )); // the two type parameters from Dictionary<,> li . Add ( typeof ( Dictionary <,>). GetGenericArguments ()[ 0 ]); li . Add ( typeof ( Dictionary <,>). GetGenericArguments ()[ 1 ]); //