<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Partho's Weblog : Visual Studio For Devices</title><link>http://blogs.msdn.com/parthopdas/archive/tags/Visual+Studio+For+Devices/default.aspx</link><description>Tags: Visual Studio For Devices</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>MEDC India 2006, Bangalore</title><link>http://blogs.msdn.com/parthopdas/archive/2006/04/12/575007.aspx</link><pubDate>Wed, 12 Apr 2006 18:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:575007</guid><dc:creator>parthopdas</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/parthopdas/comments/575007.aspx</comments><wfw:commentRss>http://blogs.msdn.com/parthopdas/commentrss.aspx?PostID=575007</wfw:commentRss><description>MEDC-India 2006. Thanks you for attending it. We loved talking to you and hearing from you......(&lt;a href="http://blogs.msdn.com/parthopdas/archive/2006/04/12/575007.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=575007" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/parthopdas/attachment/575007.ashx" length="846848" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/parthopdas/archive/tags/Visual+Studio+For+Devices/default.aspx">Visual Studio For Devices</category></item><item><title>Destination SQL Server 2005 (Mobile Edition)</title><link>http://blogs.msdn.com/parthopdas/archive/2006/01/07/510384.aspx</link><pubDate>Sat, 07 Jan 2006 13:26:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:510384</guid><dc:creator>parthopdas</dc:creator><slash:comments>10</slash:comments><comments>http://blogs.msdn.com/parthopdas/comments/510384.aspx</comments><wfw:commentRss>http://blogs.msdn.com/parthopdas/commentrss.aspx?PostID=510384</wfw:commentRss><description>Pushing SQL Server Mobile database file from a desktop application developed in VS2005 to the mobile device...(&lt;a href="http://blogs.msdn.com/parthopdas/archive/2006/01/07/510384.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=510384" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/parthopdas/archive/tags/Visual+Studio+For+Devices/default.aspx">Visual Studio For Devices</category></item><item><title>Generics Terminology in .NET Framework</title><link>http://blogs.msdn.com/parthopdas/archive/2005/10/21/483463.aspx</link><pubDate>Fri, 21 Oct 2005 18:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:483463</guid><dc:creator>parthopdas</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.msdn.com/parthopdas/comments/483463.aspx</comments><wfw:commentRss>http://blogs.msdn.com/parthopdas/commentrss.aspx?PostID=483463</wfw:commentRss><description>&lt;DIV class=P2DBlogSection&gt;
&lt;P&gt;Hi Folks...&lt;/P&gt;
&lt;P&gt;The other day I was investigating an issue that finally boiled down to incorrect usage of System.Reflection &amp;amp; System.Reflection.Emit APIs (SR &amp;amp; SRE hereafter) to analyze Generic types. We were using Type.IsGenericParameter instead of using Type.IsGenericType. During investigation, what made things worse is that each time I went through the first paragraph of their respective help pages, I got more confused. Then I decided to read the Remarks section of the help pages and I was hopelessly lost because it seemed to be written in a dialect of English that I didn’t speak!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you know the difference between Type.IsGenericParameter and Type.IsGenericType? The difference between Generic Type Parameter and Generic Type Argument perhaps? How about Closed Constructed Generic Method and Open Constructed Generic Method? These are a part of some subtle terminology introduced into .NET Framework with Generics. Using SR &amp;amp; SRE without a clear understanding this terminology is only going to land you into trouble. You are going to introduce bugs into your code and you will have a really hard time debugging your own code! Just like me!&lt;/P&gt;
&lt;P&gt;It is all there in MSDN but it is highly confusing at the first glance! So I decided to get done with this for good. I spent a good 3 hours going over Generics terminology in .NET Framework in MSDN. This is a gist of my understanding. I am all clear now. You should be too before you begin using SR and SRE.&lt;/P&gt;
&lt;H3 style="MARGIN-BOTTOM: 0.3em"&gt;&lt;SPAN style="FONT-SIZE: 1.1em"&gt;Basic Terminology&lt;/SPAN&gt;&lt;/H3&gt;
&lt;UL class=IndentedListLevel0 style="MARGIN-TOP: 0.3em"&gt;
&lt;LI class=IndentedListLevel0Item&gt;&lt;STRONG&gt;Generics&lt;/STRONG&gt;: 
&lt;UL class=IndentedListLevel0&gt;
&lt;LI class=IndentedListLevel0Item&gt;They are classes/structs/interfaces/methods (CSIM hereafter) that have placeholders for one or more of the types they store and/or use. &lt;/LI&gt;&lt;/UL&gt;
&lt;LI class=IndentedListLevel0Item&gt;&lt;STRONG&gt;Generic Type&lt;/STRONG&gt;: 
&lt;UL class=IndentedListLevel0&gt;
&lt;LI class=IndentedListLevel0Item&gt;Union of the set of all &lt;EM&gt;Generic Type Definitions&lt;/EM&gt; and &lt;EM&gt;Constructed Types&lt;/EM&gt;. 
&lt;LI class=IndentedListLevel0Item&gt;A System.Type object represents a &lt;EM&gt;Generic Type&lt;/EM&gt; iff its IsGenericType property is true &lt;/LI&gt;&lt;/UL&gt;
&lt;LI class=IndentedListLevel0Item&gt;&lt;STRONG&gt;Generic Method&lt;/STRONG&gt;: 
&lt;UL class=IndentedListLevel0&gt;
&lt;LI class=IndentedListLevel0Item&gt;Must have a non-empty list of &lt;EM&gt;Generic Type Parameters&lt;/EM&gt;. 
&lt;LI class=IndentedListLevel0Item&gt;A method being a &lt;EM&gt;Generic Method&lt;/EM&gt; doesn’t have anything to do with the enclosing type being &lt;EM&gt;Generic Type&lt;/EM&gt; or not 
&lt;LI class=IndentedListLevel0Item&gt;Union of the set of all &lt;EM&gt;Generic Method Definitions&lt;/EM&gt; and &lt;EM&gt;Constructed Methods&lt;/EM&gt;. 
&lt;LI class=IndentedListLevel0Item&gt;&lt;EM&gt;Generic Type Parameters&lt;/EM&gt; can appear as the return type or as the types of the formal parameters 
&lt;LI class=IndentedListLevel0Item&gt;A System.Reflection.MethodInfo object represents a &lt;EM&gt;Generic Method&lt;/EM&gt; iff its IsGenericMethod property is true &lt;/LI&gt;&lt;/UL&gt;
&lt;LI class=IndentedListLevel0Item&gt;&lt;STRONG&gt;Generic Type Definition&lt;/STRONG&gt;: 
&lt;UL class=IndentedListLevel0&gt;
&lt;LI class=IndentedListLevel0Item&gt;A CSI declaration that serves as a template, with placeholders for the types it can contain or use. 
&lt;LI class=IndentedListLevel0Item&gt;A System.Type object represents a &lt;EM&gt;Generic Type Definition&lt;/EM&gt; iff its IsGenericTypeDefinition property is true &lt;/LI&gt;&lt;/UL&gt;
&lt;LI class=IndentedListLevel0Item&gt;&lt;STRONG&gt;Generic Method Definition&lt;/STRONG&gt;: 
&lt;UL class=IndentedListLevel0&gt;
&lt;LI class=IndentedListLevel0Item&gt;A method with two parameter lists: A non-empty list of placeholder types and a list of formal parameters 
&lt;LI class=IndentedListLevel0Item&gt;A System.Reflection.MethodInfo object represents a &lt;EM&gt;Generic Method Definition&lt;/EM&gt; iff its IsGenericMethodDefinition property is true &lt;/LI&gt;&lt;/UL&gt;
&lt;LI class=IndentedListLevel0Item&gt;&lt;STRONG&gt;Generic Type Parameter&lt;/STRONG&gt;: 
&lt;UL class=IndentedListLevel0&gt;
&lt;LI class=IndentedListLevel0Item&gt;It is the placeholder type in a &lt;EM&gt;Generic Type/Method Definition&lt;/EM&gt;. 
&lt;LI class=IndentedListLevel0Item&gt;It is represented using a System.Type object in SR and SRE. 
&lt;LI class=IndentedListLevel0Item&gt;A System.Type object represents a &lt;EM&gt;Generic Type Parameter&lt;/EM&gt; iff its IsGenericParameter property is true 
&lt;LI class=IndentedListLevel0Item&gt;Example: Is T in Dictionary&amp;lt;T, int&amp;gt; in "class C&amp;lt;T&amp;gt; : Dictionary&amp;lt;T, int&amp;gt;" a &lt;EM&gt;Generic Type Parameter&lt;/EM&gt;? Yes! &lt;/LI&gt;&lt;/UL&gt;
&lt;LI class=IndentedListLevel0Item&gt;&lt;STRONG&gt;Generic Type Argument&lt;/STRONG&gt;: 
&lt;UL class=IndentedListLevel0&gt;
&lt;LI class=IndentedListLevel0Item&gt;It is any type that is substituted for a &lt;EM&gt;Generic Type Parameter&lt;/EM&gt;. It could be another &lt;EM&gt;Generic Type Parameter&lt;/EM&gt;. 
&lt;LI class=IndentedListLevel0Item&gt;IsGenericParameter is false 
&lt;LI class=IndentedListLevel0Item&gt;A System.Type object represents a &lt;EM&gt;Generic Type Argument&lt;/EM&gt; iff its IsGenericParameter property is false &lt;/LI&gt;&lt;/UL&gt;
&lt;LI class=IndentedListLevel0Item&gt;&lt;STRONG&gt;Constructed Generic Type/Method&lt;/STRONG&gt;: 
&lt;UL class=IndentedListLevel0&gt;
&lt;LI class=IndentedListLevel0Item&gt;A new type/method constructed as a result of specifying actual types for one or more of the &lt;EM&gt;Generic Type Parameters&lt;/EM&gt; of a &lt;EM&gt;Generic Type/Method Definition&lt;/EM&gt;. 
&lt;LI class=IndentedListLevel0Item&gt;Example: Is A&amp;lt;B&amp;lt;, &amp;gt;, &amp;gt; a &lt;EM&gt;Constructed Generic Type&lt;/EM&gt;? Yes! &lt;/LI&gt;&lt;/UL&gt;
&lt;LI class=IndentedListLevel0Item&gt;&lt;STRONG&gt;Closed/Open Constructed Generic Type&lt;/STRONG&gt;: 
&lt;UL class=IndentedListLevel0&gt;
&lt;LI class=IndentedListLevel0Item&gt;A &lt;EM&gt;Closed Constructed Generic Type&lt;/EM&gt; is the result of specifying &lt;EM&gt;Generic Type Arguments&lt;/EM&gt; for all &lt;EM&gt;Generic Type Parameters&lt;/EM&gt; of a &lt;EM&gt;Generic Type/Method Definition&lt;/EM&gt;. An &lt;EM&gt;Open Constructed Generic Type&lt;/EM&gt; otherwise. 
&lt;LI class=IndentedListLevel0Item&gt;A System.Type object represents a &lt;EM&gt;Closed Constructed Generic Type&lt;/EM&gt; iff its ContainsGenericParameters property is false. Otherwise it is an &lt;EM&gt;Open Constructed Generic Type&lt;/EM&gt;. 
&lt;LI class=IndentedListLevel0Item&gt;Only a &lt;EM&gt;Closed Constructed Generic Type&lt;/EM&gt; can be instantiated 
&lt;LI class=IndentedListLevel0Item&gt;Is A&amp;lt;B&amp;lt;T, string&amp;gt;, int&amp;gt;.C a &lt;EM&gt;Closed Constructed Generic Type&lt;/EM&gt;? No! &lt;/LI&gt;&lt;/UL&gt;
&lt;LI class=IndentedListLevel0Item&gt;&lt;STRONG&gt;Closed/Open Constructed Generic Method&lt;/STRONG&gt;: 
&lt;UL class=IndentedListLevel0&gt;
&lt;LI class=IndentedListLevel0Item&gt;A &lt;EM&gt;Closed Constructed Generic Method&lt;/EM&gt; has no unassigned &lt;EM&gt;Generic Type Parameters&lt;/EM&gt; *and* the containing type is a &lt;EM&gt;Closed Constructed Generic Type&lt;/EM&gt; *and* all the &lt;EM&gt;Generic Type Arguments&lt;/EM&gt; are &lt;EM&gt;Closed Constructed Generic Types&lt;/EM&gt;. An &lt;EM&gt;Open Constructed Generic Method&lt;/EM&gt; otherwise. 
&lt;LI class=IndentedListLevel0Item&gt;A System.Reflection.MethodInfo object represents a &lt;EM&gt;Closed Constructed Generic Method&lt;/EM&gt; iff its ContainsGenericParameters property is false. Otherwise it is an &lt;EM&gt;Open Constructed Generic Method&lt;/EM&gt; &lt;/LI&gt;&lt;/UL&gt;
&lt;LI class=IndentedListLevel0Item&gt;&lt;STRONG&gt;Constraints&lt;/STRONG&gt;: 
&lt;UL class=IndentedListLevel0&gt;
&lt;LI class=IndentedListLevel0Item&gt;They are limits placed on &lt;EM&gt;Generic Type Parameters&lt;/EM&gt;. 
&lt;LI class=IndentedListLevel0Item&gt;The GenericParameterAttributes property of a System.Type object representing a &lt;EM&gt;Generic Type Parameter&lt;/EM&gt; gets a combination of System.Reflection.GenericParameterAttributes flags that describe its covariance and special constraints 
&lt;LI class=IndentedListLevel0Item&gt;The GetGenericParameterConstraints() method of a System.Type object representing a &lt;EM&gt;Generic Type Parameter&lt;/EM&gt; returns an array of System.Type objects that represent its constraints. &lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;H3 style="MARGIN-BOTTOM: 0.3em"&gt;&lt;SPAN style="FONT-SIZE: 1.1em"&gt;A few points to note &lt;/SPAN&gt;&lt;/H3&gt;
&lt;UL class=IndentedListLevel0 style="MARGIN-TOP: 0.3em"&gt;
&lt;LI class=IndentedListLevel0Item&gt;If a nested types doesn't have &lt;EM&gt;Generic Type Parameters&lt;/EM&gt; of its own, the enclosing type determines the above for it. 
&lt;LI class=IndentedListLevel0Item&gt;&lt;EM&gt;Generic Type Parameters&lt;/EM&gt; and &lt;EM&gt;Generic Type Arguments&lt;/EM&gt; have the same relation as the parameters and arguments of a function. 
&lt;LI class=IndentedListLevel0Item&gt;typeof(Dictionary&amp;lt;, &amp;gt;).MakeArrayType() returns a System.Type object that is not a &lt;EM&gt;Generic Type&lt;/EM&gt; but is an Open Constructed Generic Type. Same for pointers 
&lt;LI class=IndentedListLevel0Item&gt;In SR &amp;amp; SRE: 
&lt;UL class=IndentedListLevel0&gt;
&lt;LI class=IndentedListLevel0Item&gt;&lt;EM&gt;Generic Type Parameters&lt;/EM&gt; are represented by System.Type 
&lt;LI class=IndentedListLevel0Item&gt;A Type/MethodInfo object representing a &lt;EM&gt;Generic Type/Method&lt;/EM&gt; has an array of types containing the &lt;EM&gt;Generic Type Parameters&lt;/EM&gt; and &lt;EM&gt;Generic Type Arguments&lt;/EM&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;H3 style="MARGIN-BOTTOM: 0.3em"&gt;&lt;SPAN style="FONT-SIZE: 1.1em"&gt;Examples to consolidate our understanding&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;Consider the followign code snippet. The invariant conditions are shown in the comments below it.&lt;/P&gt;
&lt;P class=InlinedCode&gt;&lt;SPAN class=InlinedCode_Keyword&gt;public&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt; &lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Keyword&gt;class&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Class&gt; Base&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Operator&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Identifier&gt;T&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt;, &lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Identifier&gt;U&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Operator&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt;&lt;BR&gt;{&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Keyword&gt;&amp;nbsp; &amp;nbsp; public&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt; &lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Keyword&gt;static&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt; &lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Identifier&gt;T&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt; &lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Identifier&gt;M1Base&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt;(&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Identifier&gt;U&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt; &lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Identifier&gt;u&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt;) &lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt;{ &lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Keyword&gt;return&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt; &lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Keyword&gt;default&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt;(&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Identifier&gt;T&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt;); &lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt;}&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN class=InlinedCode_Code&gt;}&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Keyword&gt;&lt;BR&gt;public&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt; &lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Keyword&gt;class&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Class&gt; Derived&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Operator&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Identifier&gt;V&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Operator&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Class&gt; : Base&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Operator&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Keyword&gt;string&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt;, &lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Identifier&gt;V&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Operator&gt;&amp;gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt;{&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Keyword&gt;&amp;nbsp; &amp;nbsp; public&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Class&gt; G&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Operator&gt;&amp;lt;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN class=InlinedCode_Code&gt;Derived&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN class=InlinedCode_Operator&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Identifier&gt;V&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Operator&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt; &lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Identifier&gt;F&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt;;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Keyword&gt;&amp;nbsp; &amp;nbsp; &lt;BR&gt;&amp;nbsp; &amp;nbsp; public&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt; &lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Keyword&gt;class&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Class&gt; Nested&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt;&amp;nbsp; &amp;nbsp; {&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Keyword&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt; &lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Identifier&gt;M1Nested&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt;() { }&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt;&amp;nbsp; &amp;nbsp; }&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Keyword&gt;&amp;nbsp; &amp;nbsp; &lt;BR&gt;&amp;nbsp; &amp;nbsp; public&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt; &lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Keyword&gt;static&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt; &lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Keyword&gt;void&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt; &lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Identifier&gt;M1Derived&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Operator&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Identifier&gt;W&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Operator&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt;() { }&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt;}&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Keyword&gt;&lt;BR&gt;public&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt; &lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Keyword&gt;class&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Class&gt; G&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Operator&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Identifier&gt;T&lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Operator&gt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN class=InlinedCode_Code&gt;{ }&lt;/SPAN&gt; &lt;SPAN class=InlinedCode_Comment&gt;&lt;BR&gt;&lt;BR&gt;/*&lt;BR&gt;Type: Derived&amp;lt;V&amp;gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; IsGenericType: True&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; IsGenericTypeDefinition: True&lt;BR&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; ContainsGenericParameters: True&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IsGenericParameter: False&lt;BR&gt;&lt;BR&gt;Type: Base&amp;lt;string, V&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; IsGenericType: True&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IsGenericTypeDefinition: False&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ContainsGenericParameters: True&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IsGenericParameter: False&lt;BR&gt;&lt;BR&gt;Type: Array of Derived&amp;lt;int&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; IsGenericType: False&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IsGenericTypeDefinition: False&lt;BR&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; ContainsGenericParameters: False&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IsGenericParameter: False&lt;BR&gt;&lt;BR&gt;Type: Type parameter T in Base&amp;lt;T&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; IsGenericType: False&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; IsGenericTypeDefinition: False&lt;BR&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; ContainsGenericParameters: True&lt;BR&gt;IsGenericParameter: True&lt;BR&gt;&lt;BR&gt;Type: Field Derived&amp;lt;V&amp;gt;.F&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; IsGenericType: True&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; IsGenericTypeDefinition: False&lt;BR&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; ContainsGenericParameters: True&lt;BR&gt;IsGenericParameter: False&lt;BR&gt;&lt;BR&gt;Type: Nested&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; IsGenericType: True&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; IsGenericTypeDefinition: True&lt;BR&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; ContainsGenericParameters: True&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IsGenericParameter: False&lt;BR&gt;&lt;BR&gt;Method: T Base&amp;lt;T, U&amp;gt;.M1Base(U u)&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; IsGenericMethod: False&lt;BR&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; IsGenericMethodDefinition: False&lt;BR&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; ContainsGenericParameters: True&lt;BR&gt;&lt;BR&gt;Method: void Derived&amp;lt;V&amp;gt;.M1Derived&amp;lt;W&amp;gt;()&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; IsGenericMethod: True&lt;BR&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; IsGenericMethodDefinition: True&lt;BR&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; ContainsGenericParameters: True&lt;BR&gt;&lt;BR&gt;Method: void Derived&amp;lt;V&amp;gt;.M1Derived&amp;lt;int&amp;gt;();&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; IsGenericMethod: True&lt;BR&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; IsGenericMethodDefinition: False&lt;BR&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; ContainsGenericParameters: True&lt;BR&gt;&lt;BR&gt;Method: void Derived&amp;lt;string&amp;gt;.M1Derived&amp;lt;int&amp;gt;()&lt;BR&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; IsGenericMethod: True&lt;BR&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; IsGenericMethodDefinition: False&lt;BR&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; ContainsGenericParameters: False&lt;BR&gt;*/&lt;BR&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H3 style="MARGIN-BOTTOM: 0.3em"&gt;&lt;SPAN style="FONT-SIZE: 1.1em"&gt;Some of the System.Reflection API for Generics&lt;/SPAN&gt;&lt;/H3&gt;
&lt;UL class=IndentedListLevel0 style="MARGIN-TOP: 0.3em"&gt;
&lt;LI class=IndentedListLevel0Item&gt;System.Type.*Generic* members: 
&lt;UL class=IndentedListLevel0&gt;
&lt;LI class=IndentedListLevel0Item&gt;[P] ContainsGenericParameters: True if the type is an &lt;EM&gt;Open Constructed Generic Type&lt;/EM&gt;. False otherwise.&amp;nbsp; 
&lt;LI class=IndentedListLevel0Item&gt;[P] GenericParameterAttributes: Gets a combination of System.Reflection.GenericParameterAttributes flags that describe the covariance and special &lt;EM&gt;Constraints&lt;/EM&gt; of a &lt;EM&gt;Generic Type Parameter&lt;/EM&gt; 
&lt;LI class=IndentedListLevel0Item&gt;[P] GenericParameterPosition: Gets the position of the &lt;EM&gt;Generic Type Parameter&lt;/EM&gt; in the &lt;EM&gt;Generic Type Parameter&lt;/EM&gt; list of the &lt;EM&gt;Generic Type/Method&lt;/EM&gt; that declared the parameter.&amp;nbsp; 
&lt;LI class=IndentedListLevel0Item&gt;[P] IsGenericParameter: True if the type represents a &lt;EM&gt;Generic Type Parameter&lt;/EM&gt;. False otherwise.&amp;nbsp; 
&lt;LI class=IndentedListLevel0Item&gt;[P] IsGenericType: True if the type represents a &lt;EM&gt;Generic Type&lt;/EM&gt;. False otherwise.&amp;nbsp; 
&lt;LI class=IndentedListLevel0Item&gt;[P] IsGenericTypeDefinition: True if the type represents a &lt;EM&gt;Generic Type Definition&lt;/EM&gt;. False otherwise.&amp;nbsp; 
&lt;LI class=IndentedListLevel0Item&gt;[M] GetGenericArguments: Get the array of types representing &lt;EM&gt;Generic Type Parameter/Arguments&lt;/EM&gt; of the type. 
&lt;LI class=IndentedListLevel0Item&gt;[M] GetGenericParameterConstraints: Returns an array of System.Type objects that represent the &lt;EM&gt;Constraints&lt;/EM&gt; of a &lt;EM&gt;Generic Type&lt;/EM&gt;.&amp;nbsp; 
&lt;LI class=IndentedListLevel0Item&gt;[M] GetGenericTypeDefinition: Gets the &lt;EM&gt;Generic Type Definition&lt;/EM&gt; corresponding to the &lt;EM&gt;Generic Type&lt;/EM&gt;. 
&lt;LI class=IndentedListLevel0Item&gt;[M] MakeGenericType: Construct &lt;EM&gt;Closed/Open Constructed Generic Type&lt;/EM&gt; from the &lt;EM&gt;Generic Type Definition&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;LI class=IndentedListLevel0Item&gt;System.Reflection.MethodInfo.*Generic* members: 
&lt;UL class=IndentedListLevel0&gt;
&lt;LI class=IndentedListLevel0Item&gt;[P] ContainsGenericParameters: True if the type is an &lt;EM&gt;Open Constructed Generic Method&lt;/EM&gt;. False otherwise. 
&lt;LI class=IndentedListLevel0Item&gt;[P] IsGenericMethod: True if the MethodInfo represents a &lt;EM&gt;Generic Method&lt;/EM&gt;. False otherwise. &amp;nbsp; 
&lt;LI class=IndentedListLevel0Item&gt;[P] IsGenericMethodDefinition: True if the MethodInfo represents a &lt;EM&gt;Generic Method Definition&lt;/EM&gt;. False otherwise. &amp;nbsp; 
&lt;LI class=IndentedListLevel0Item&gt;[M] GetGenericArguments: Get the array of types representing &lt;EM&gt;Generic Type Parameter/Arguments&lt;/EM&gt; of the MethodInfo 
&lt;LI class=IndentedListLevel0Item&gt;[M] GetGenericMethodDefinition: Gets the &lt;EM&gt;Generic Method Definition&lt;/EM&gt; corresponding to the &lt;EM&gt;Generic Method&lt;/EM&gt; 
&lt;LI class=IndentedListLevel0Item&gt;[M] MakeGenericMethod: Construct &lt;EM&gt;Closed/Open Constructed Generic Method&lt;/EM&gt; from the &lt;EM&gt;Generic Method Definition&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;H3 style="MARGIN-BOTTOM: 0.3em"&gt;&lt;SPAN style="FONT-SIZE: 1.1em"&gt;References&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P style="MARGIN-BOTTOM: 0.3em"&gt;If you want to learn more about Reflection &amp;amp; Generics in .NET Framework here are some references: &lt;/P&gt;
&lt;UL class=IndentedListLevel0 style="MARGIN-TOP: 0.3em"&gt;
&lt;LI class=IndentedListLevel0Item&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/ms172193"&gt;Overview of Generics in the .NET Framework&lt;/A&gt; clears up basic terminology 
&lt;LI class=IndentedListLevel0Item&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/ms172334"&gt;Overview of Reflection and Generics&lt;/A&gt; explains the how to analyze generics usign SR &amp;amp; SRE APIs. 
&lt;LI class=IndentedListLevel0Item&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/system.type.isgenerictype"&gt;Type.IsGenericType Property&lt;/A&gt; &amp;amp; &lt;A href="http://msdn2.microsoft.com/en-us/library/system.reflection.methodinfo.isgenericmethod"&gt;MethodInfo.IsGenericMethod Property&lt;/A&gt; describes and has examples of various combinations 
&lt;LI class=IndentedListLevel0Item&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/b8ytshk6"&gt;How to: Examine and Instantiate Generic Types with Reflection&lt;/A&gt; provides some walkthroughs for using SR &amp;amp; SRE for &lt;EM&gt;Generic Types/Methods &lt;/EM&gt;
&lt;LI class=IndentedListLevel0Item&gt;&lt;EM&gt;&lt;/EM&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/4xxf1410"&gt;How to: Define a Generic Type with Reflection Emit&lt;/A&gt; gives examples on how to emit generic types using SRE. &lt;/LI&gt;&lt;/UL&gt;
&lt;H3 style="MARGIN-BOTTOM: 0.3em"&gt;&lt;SPAN style="FONT-SIZE: 1.1em"&gt;&lt;STRONG&gt;Finally as an exercise&lt;/STRONG&gt;: &lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/ms131514"&gt;Type.IsGenericType Property&lt;/A&gt; help page contains an error in the Example-Invariants table. Armed with the above knowledge find it out and let me know! :)&lt;/P&gt;
&lt;P&gt;That's all for now... See you in my next post!&lt;/P&gt;&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=483463" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/parthopdas/archive/tags/Visual+Studio+For+Devices/default.aspx">Visual Studio For Devices</category></item></channel></rss>