<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Posts Tagged With 'types' RSS Feed</title>
    <link>http://www.programmersheaven.com/blog/tags/types</link>
    <description>Contains the latest posts from the Programmer's Heaven blogs that are tagged with the label 'types'</description>
    <lastBuildDate>Tue, 08 Jul 2008 21:18:26 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <item>
      <title>When C# bites</title>
      <link>http://www.programmersheaven.com/user/Jonathan/blog/85-When-C-bites/</link>
      <description>So I wanted to do:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;private TTo Identity&amp;lt;TFrom,TTo&amp;gt;(TFrom I)
{
    return (TTo)I;
}&lt;/pre&gt;&lt;br /&gt;
Well, actually I didn't. I wanted C# to be smart enough to realize that if S is a subtype of T then List&amp;lt;S&amp;gt; can safely be assumed to be a subtype of List&amp;lt;T&amp;gt;. But anyway, that's not the case, and you have to call ConvertAll on the List to get it to be a List&amp;lt;T&amp;gt; rather than a List&amp;lt;S&amp;gt;. Joy. Anyway, turns out the above fails to compile. Thankfully, this works:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;private TTo Identity&amp;lt;TFrom,TTo&amp;gt;(TFrom I)
{
    return (TTo)(object)I;
}&lt;/pre&gt;&lt;br /&gt;
But, argh.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/user/Jonathan/blog/85-When-C-bites/</guid>
      <pubDate>Wed, 28 Nov 2007 06:25:35 -0700</pubDate>
      <dc:creator>Jonathan</dc:creator>
    </item>
    <item>
      <title>Learn C# 3.0 With Our New Series!</title>
      <link>http://www.programmersheaven.com/user/pheaven/blog/74-Learn-C-30-With-Our-New-Series/</link>
      <description>This week we are starting a brand new four part series, covering the new features of C# 3.0! The first article of the series covers type inference. You'll learn:&lt;br /&gt;
* What is type inference anyway?&lt;br /&gt;
* How can you take advantage of it?&lt;br /&gt;
* What does the new "var" keyword do?&lt;br /&gt;
* Is this at all related to Variant types in Visual Basic?&lt;br /&gt;
* Will using this hurt the performance of your programs at runtime?&lt;br /&gt;
&lt;a href="http://www.programmersheaven.com/2/CSharp3-1"&gt;Check out the article!&lt;/a&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/user/pheaven/blog/74-Learn-C-30-With-Our-New-Series/</guid>
      <pubDate>Wed, 21 Nov 2007 09:31:37 -0700</pubDate>
      <dc:creator>pheaven</dc:creator>
    </item>
  </channel>
</rss>