Comments on: Simple typeswitch in C# 3.0, Part 2: The Solutions /2007/09/20/simple-typeswitch-in-c-30-part-2-the-solutions/ Thu, 16 Mar 2017 16:29:15 +0000 hourly 1 http://wordpress.org/?v=4.2.14 By: Clarityx /2007/09/20/simple-typeswitch-in-c-30-part-2-the-solutions/comment-page-1/#comment-1673 Mon, 27 Apr 2009 03:30:29 +0000 /index.php/2007/09/20/simple-typeswitch-in-c-30-part-2-the-solutions/#comment-1673 Interesting post. Appreciate it as I have seen something new now.
Can I use this info on my blog using the direct link to your blog? Thanks in advance

]]>
By: Clarityx /2007/09/20/simple-typeswitch-in-c-30-part-2-the-solutions/comment-page-1/#comment-1627 Sun, 26 Apr 2009 19:30:29 +0000 /index.php/2007/09/20/simple-typeswitch-in-c-30-part-2-the-solutions/#comment-1627 Interesting post. Appreciate it as I have seen something new now.
Can I use this info on my blog using the direct link to your blog? Thanks in advance

]]>
By: data backup /2007/09/20/simple-typeswitch-in-c-30-part-2-the-solutions/comment-page-1/#comment-1613 Mon, 06 Apr 2009 11:50:53 +0000 /index.php/2007/09/20/simple-typeswitch-in-c-30-part-2-the-solutions/#comment-1613 just exactly what I needed, thanks for clearing up things on my mind.

]]>
By: Nina /2007/09/20/simple-typeswitch-in-c-30-part-2-the-solutions/comment-page-1/#comment-331 Sat, 13 Oct 2007 10:49:09 +0000 /index.php/2007/09/20/simple-typeswitch-in-c-30-part-2-the-solutions/#comment-331 3 comments

]]>
By: Andrey Shchekin /2007/09/20/simple-typeswitch-in-c-30-part-2-the-solutions/comment-page-1/#comment-296 Fri, 21 Sep 2007 20:23:41 +0000 /index.php/2007/09/20/simple-typeswitch-in-c-30-part-2-the-solutions/#comment-296 Yes, I have seen a post on a similar problem with LINQ.
Type inference has its limits.

]]>
By: Andrey Titov /2007/09/20/simple-typeswitch-in-c-30-part-2-the-solutions/comment-page-1/#comment-295 Fri, 21 Sep 2007 15:38:34 +0000 /index.php/2007/09/20/simple-typeswitch-in-c-30-part-2-the-solutions/#comment-295 Would your switch get confused if it cannot infer the return type from the first case?

string result = Switch.Type(document)
.Case((XsltDocument d) => null)
.Case((XmlDocument d) => “Xml”)
.Otherwise(d => “Not Xml and not Xslt”)
.Result;

]]>