<?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>Dynamic base classes in C# 4</title><link>http://blogs.msdn.com/b/cburrows/archive/2009/04/22/dynamic-base-classes-in-c-4.aspx</link><description>Ok, where were we? We have this new type called dynamic, and it’s used to tell the compiler to defer binding until runtime. We can construct other types with it as usual, and therefore use dynamic[], IEnumerable&amp;lt;dynamic&amp;gt;, List&amp;lt;dynamic&amp;gt;, and</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Dynamic base classes in C# 4</title><link>http://blogs.msdn.com/b/cburrows/archive/2009/04/22/dynamic-base-classes-in-c-4.aspx#9701452</link><pubDate>Fri, 05 Jun 2009 18:05:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9701452</guid><dc:creator>Chris Eargle</dc:creator><description>&lt;p&gt;Nope; that code is invalid. It's not legal to constrain a generic by dynamic. I would assume this is because it gets compiled down to object.&lt;/p&gt;
&lt;p&gt;If you really want to &amp;quot;inherit&amp;quot; from dynamic you can use System.Dynamic.DynamicObject. This will provide dynamic behavior at runtime.&lt;/p&gt;
&lt;p&gt;I find List&amp;lt;dynamic&amp;gt; interesting. You can put anything you want in there, but it will come back out with dynamic behavior. Your original references remain static. That's pretty cool.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9701452" width="1" height="1"&gt;</description></item><item><title>re: Dynamic base classes in C# 4</title><link>http://blogs.msdn.com/b/cburrows/archive/2009/04/22/dynamic-base-classes-in-c-4.aspx#9570164</link><pubDate>Mon, 27 Apr 2009 05:37:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9570164</guid><dc:creator>David Nelson</dc:creator><description>&lt;p&gt;Given that nothing can inherit from dynamic, &amp;quot;where T : dynamic&amp;quot; doesn't seem to make any sense. Either C should not have a generic parameter T and should use dynamic instead, or T should not have constraints and the consumer should pass generic.&lt;/p&gt;
&lt;p&gt;As for &amp;quot;U : List&amp;lt;dynamic&amp;gt;&amp;quot;, I don't see any reason why that wouldn't work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9570164" width="1" height="1"&gt;</description></item><item><title>Reflective Perspective - Chris Alcock  &amp;raquo; The Morning Brew #333</title><link>http://blogs.msdn.com/b/cburrows/archive/2009/04/22/dynamic-base-classes-in-c-4.aspx#9564094</link><pubDate>Thu, 23 Apr 2009 09:24:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9564094</guid><dc:creator>Reflective Perspective - Chris Alcock  &amp;raquo; The Morning Brew #333</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://blog.cwa.me.uk/2009/04/23/the-morning-brew-333/"&gt;http://blog.cwa.me.uk/2009/04/23/the-morning-brew-333/&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9564094" width="1" height="1"&gt;</description></item></channel></rss>