<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Channel 9 Forums - Coffeehouse - Select Case behavior</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Forums/rss"></atom:link>
	<image>
		<url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
		<title>Channel 9 Forums - Coffeehouse - Select Case behavior</title>
		<link>http://channel9.msdn.com/Forums</link>
	</image>
	<description>Channel 9 keeps you up to date with the latest news and behind the scenes info from Microsoft that developers love to keep up with. From LINQ to SilverLight – Watch videos and hear about all the cool technologies coming and the people behind them.</description>
	<link>http://channel9.msdn.com/Forums</link>
	<language>en</language>
	<pubDate>Fri, 24 May 2013 18:38:27 GMT</pubDate>
	<lastBuildDate>Fri, 24 May 2013 18:38:27 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<c9:totalResults>37</c9:totalResults>
	<c9:pageCount>-37</c9:pageCount>
	<c9:pageSize>-1</c9:pageSize>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>Curious ... I've recently been doing some parsing of some old file structures and in the process put in&nbsp;a little trick I remembered using in the VB3-6 days.&nbsp; Only it doesn't work in .NET 2.0 like that anymore.&nbsp; That made me wonder if I really was remembering the past correctly (not exactly my strong suit!).</p><p>In the VB3-6 days when MyVarWithNumber9InIt = 9 then it would go through both case statements for 9 in the select case block.&nbsp; In .NET 2.0 it goes through the first case for 9 then jumps out.</p><p>Select case MyVarWithNumber9InIt</p><p>Case 1</p><p>'do case 1 stuff</p><p>Case 2</p><p>'do case 2 stuff</p><p>Case 9</p><p>'do case 9 stuff</p><p>Case 3</p><p>'do case 3 stuff</p><p>Case 9</p><p>'do case stuff</p><p>Case else</p><p>End select</p><p>&nbsp;</p><p>Does anyone else remember this type of behavior from the past?&nbsp; Did the same type of behavior exist in the past for the Switch statement in C or was this a &quot;feature&quot; of the VB3-6 runtime?</p><p>&nbsp;</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/286a2af62b37474c94549f35012045d0#286a2af62b37474c94549f35012045d0</link>
		<pubDate>Thu, 04 Aug 2011 17:29:34 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/286a2af62b37474c94549f35012045d0#286a2af62b37474c94549f35012045d0</guid>
		<dc:creator>Dave Williamson</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/davewill/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>I don't remember if it was C or VB specifically but there were definitely languages that allowed this. I'd say they got rid of it because it's also hugely error prone: you'd be looking at a case block thinking &quot;It's setting all this stuff correctly, so why is it messed up later?&quot; and miss the fact that there's a second case block for that case further down. Same reason they got rid of the fall through stuff and require a break or return at the end of each case.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/e2099a693e2b464c8c669f350122f148#e2099a693e2b464c8c669f350122f148</link>
		<pubDate>Thu, 04 Aug 2011 17:39:17 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/e2099a693e2b464c8c669f350122f148#e2099a693e2b464c8c669f350122f148</guid>
		<dc:creator>Bas</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Bas/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>If I am correct the order of execution of the cases in a switch statement is not defined by the spec because fall trough behavior (like in C and C&#43;&#43;) is not permitted&nbsp;C# ( I'm not sure for VB).</p><p>But&nbsp;I guess C# would just not compile since you have two cases checking against the same constant.</p><p>So my guess would be when VB changed to VB.NET this change happened because fall trough behavior is not allowed anymore.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/8bab294abb1c499695b39f350123e512#8bab294abb1c499695b39f350123e512</link>
		<pubDate>Thu, 04 Aug 2011 17:42:45 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/8bab294abb1c499695b39f350123e512#8bab294abb1c499695b39f350123e512</guid>
		<dc:creator>CKurt</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/CKurt/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>I don't recall, honestly, and I don't have a copy of VB to test it out. Anyway, the only <a href="http://msdn.microsoft.com/en-us/library/aa266274(v=VS.60).aspx">documentation</a> I could find seems to indicate that that was not the intended behavior anyway.</p><p>As for C, no, it never behaved that way. C maps the case labels (which must be integer constants)&nbsp;in &nbsp;jump tables and obviously throws a fit if one of the labels is duplicated.</p><p>Just out of curiosity, I cannot figure out the advantage of using that particular artifact. Care to elaborate?</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/583b44c1e86546c792049f350128f0ed#583b44c1e86546c792049f350128f0ed</link>
		<pubDate>Thu, 04 Aug 2011 18:01:07 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/583b44c1e86546c792049f350128f0ed#583b44c1e86546c792049f350128f0ed</guid>
		<dc:creator>Blue Ink</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Blue Ink/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Select-Case-behavior#c583b44c1e86546c792049f350128f0ed">Blue Ink</a>: It was mainly to make the code more maintainable.&nbsp; Sometimes when parsing older documents they would start off with nice recordtypes but then later through some spec comittee it would end up with one of the recordtypes behaving in different ways depending on what recordtypes occurred prior to reaching it.</p><p>The Case 9 would then contain another Select case for the different behaviors.</p><p>The use of separate case statements kept the different logic more readable since they really were not related.&nbsp; Purely a way to make the code more readable.</p><p>EDIT: I should have noted that the reason they didn't create a new recordtype is because they didn't want to break the existing spec.&nbsp; thus a shoehorn was introduced <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/8c034e90cde543bd84eb9f35012b3de7#8c034e90cde543bd84eb9f35012b3de7</link>
		<pubDate>Thu, 04 Aug 2011 18:09:30 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/8c034e90cde543bd84eb9f35012b3de7#8c034e90cde543bd84eb9f35012b3de7</guid>
		<dc:creator>Dave Williamson</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/davewill/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>@<a href="http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior#c286a2af62b37474c94549f35012045d0">davewill</a>: I just tested in VB6, and it doesn't hit both cases.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/2dab70f539a0441b82e79f35012e7639#2dab70f539a0441b82e79f35012e7639</link>
		<pubDate>Thu, 04 Aug 2011 18:21:13 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/2dab70f539a0441b82e79f35012e7639#2dab70f539a0441b82e79f35012e7639</guid>
		<dc:creator>kettch</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/kettch/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/2dab70f539a0441b82e79f35012e7639">8 minutes&nbsp;ago</a>,<a href="http://channel9.msdn.com/Niners/kettch">kettch</a> wrote</p><p>@<a href="http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior#c286a2af62b37474c94549f35012045d0">davewill</a>: I just tested in VB6, and it doesn't hit both cases.</p><p></p></div></blockquote><p></p><p>Confirmed. The execution jumps out of the Select Case after&nbsp;the first&nbsp;matching case is hit and executed.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/b978dcb220ca4cd9ae309f3501314626#b978dcb220ca4cd9ae309f3501314626</link>
		<pubDate>Thu, 04 Aug 2011 18:31:28 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/b978dcb220ca4cd9ae309f3501314626#b978dcb220ca4cd9ae309f3501314626</guid>
		<dc:creator>Scott</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/spivonious/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>Do you mean the BREAK; ?</p><p>I know in C&#43;&#43;, you can say,</p><p>Case1:</p><p>somehting1;</p><p>Case2:</p><p>somthing2; break;</p><p>Because case1 doesn't have break, case1 will do both&nbsp;somthing1 and something2, then finally break; You cannot do this on C# for sure because you are required to have break;. But, basically that's the word. If you break, you break the entire switch statement, it wouldn't make sense to even see the second Case9 as it already break.</p><p>&nbsp;</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/51e624b8b60743acb4b89f35015e4f4a#51e624b8b60743acb4b89f35015e4f4a</link>
		<pubDate>Thu, 04 Aug 2011 21:15:26 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/51e624b8b60743acb4b89f35015e4f4a#51e624b8b60743acb4b89f35015e4f4a</guid>
		<dc:creator>magicalclick</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/magicalclick/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>Hmmm ... and I wasn't old enough to have&nbsp;enjoyed the 70's <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' />&nbsp; &lt;insert head scratch here/&gt;</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/1d03b446b7a6421a982e9f35016baf39#1d03b446b7a6421a982e9f35016baf39</link>
		<pubDate>Thu, 04 Aug 2011 22:04:08 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/1d03b446b7a6421a982e9f35016baf39#1d03b446b7a6421a982e9f35016baf39</guid>
		<dc:creator>Dave Williamson</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/davewill/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>One thing about the C# switch statement is that it allows you to have the same code execute for different cases by allowing the code to fall through cases that have no code contained therein:</p><p><pre class="brush: csharp">            switch (x)
            {
                case 0:
                    //do something 0
                    break;
                case 1:
                    //fall through
                case 2:
                    //fall through
                case 4:
                    //do something 1, 2, or 4
                    break;
                case 3:
                    // do something 3
                    break;
                default:
                    // do something default
                    break;
            }</pre></p><p>I find this to be quite useful.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/a28cce9a1b0b47a794399f36001d4b66#a28cce9a1b0b47a794399f36001d4b66</link>
		<pubDate>Fri, 05 Aug 2011 01:46:39 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/a28cce9a1b0b47a794399f36001d4b66#a28cce9a1b0b47a794399f36001d4b66</guid>
		<dc:creator>cbae</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/cbae/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>@cbae it's not c# specific, even vb.net supports a more readable select or option</p><p><pre class="brush: vb">Select Case x     
   Case 0,1,2,3         
        Console.WriteLine(&quot;hit&quot;) 
End Select</pre></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/edd93c85af7e4c1a81069f360024cdaf#edd93c85af7e4c1a81069f360024cdaf</link>
		<pubDate>Fri, 05 Aug 2011 02:13:59 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/edd93c85af7e4c1a81069f360024cdaf#edd93c85af7e4c1a81069f360024cdaf</guid>
		<dc:creator>xgamer</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/xgamer/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Select-Case-behavior#cedd93c85af7e4c1a81069f360024cdaf">xgamer</a>:</p><p>I recently came up against a _bug_ in VB.Net where this didn't seem to do what I wanted it to:</p><p><pre class="brush: vb">Select Case X
    Case 1
    Case 2
    Case 3
        Consol.WriteLine(&quot;hit&quot;)
End Select</pre></p><p>I spent far too much time trying to figure out why Console.WriteLine(&quot;hit&quot;) was skipped when X was 1.&nbsp; Any moderately seasoned VB developer can probably figure out pretty quickly, but I'm from the C world...</p><p>This worked much better:</p><p><pre class="brush: vb">Select Case X
    Case 1,
    Case 2,
    Case 3
        Consol.WriteLine(&quot;hit&quot;)
End Select</pre></p><p>I'll admit that VB.Net is a complete .Net language, but I'm a bit tired of tracking down stupid syntax bugs...</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/a3b3d366509c44ab82ae9f3a0124c50e#a3b3d366509c44ab82ae9f3a0124c50e</link>
		<pubDate>Tue, 09 Aug 2011 17:45:56 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/a3b3d366509c44ab82ae9f3a0124c50e#a3b3d366509c44ab82ae9f3a0124c50e</guid>
		<dc:creator>ScanIAm</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/ScanIAm/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>This might be more readable for you.</p><p><pre class="brush: vb">Select case X
  Case 1, 2, 3
    Console.WriteLine(&quot;hit&quot;)
  Case Else
    Console.WriteLine(&quot;nadda&quot;)
End Select</pre></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/b300a10e2d55476288c19f3a012ed483#b300a10e2d55476288c19f3a012ed483</link>
		<pubDate>Tue, 09 Aug 2011 18:22:34 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/b300a10e2d55476288c19f3a012ed483#b300a10e2d55476288c19f3a012ed483</guid>
		<dc:creator>Dave Williamson</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/davewill/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>You could also shrink that down to a single case statement.</p><p><pre class="brush: vb">Select Case X

Case 1 To 3: Console.WriteLine(&quot;hit&quot;)

End Select</pre></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/f0a19db608c7403695199f3a012efd01#f0a19db608c7403695199f3a012efd01</link>
		<pubDate>Tue, 09 Aug 2011 18:23:08 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/f0a19db608c7403695199f3a012efd01#f0a19db608c7403695199f3a012efd01</guid>
		<dc:creator>Adam Speight</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/AdamSpeight2008/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>@<a href="http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior#ca3b3d366509c44ab82ae9f3a0124c50e">ScanIAm</a>: Yep, Select Case is not switch, even though they have similar functionality.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/fe6fb7b50d53430db0469f3a01300e60#fe6fb7b50d53430db0469f3a01300e60</link>
		<pubDate>Tue, 09 Aug 2011 18:27:02 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/fe6fb7b50d53430db0469f3a01300e60#fe6fb7b50d53430db0469f3a01300e60</guid>
		<dc:creator>Scott</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/spivonious/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>I've seen Bart Desmet showing what switch case statements are like when you compile them to IL,. It's really funny!</p><p>When you do;</p><p><pre class="brush: csharp">int i = 0;
switch(i)
{
case 8:
bla();
break;
case 9:
bla9();
break;
}</pre></p><p>it actually compiles into;</p><p><pre class="brush: csharp">int i = 8;
switch(i)
{
case 0:
bla();
break;
case 1:
bla9();
break;
}</pre></p><p>They also do all sorts optimizations for multiple ranges,.. Was really fun session!</p><p>here it is; <a href="http://channel9.msdn.com/Events/DevDays/DevDays-2011-Netherlands/Devdays041">http://channel9.msdn.com/Events/DevDays/DevDays-2011-Netherlands/Devdays041</a></p><p>man I love C9</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/b97b6084c195439f9a1f9f3a0130e6e7#b97b6084c195439f9a1f9f3a0130e6e7</link>
		<pubDate>Tue, 09 Aug 2011 18:30:06 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/b97b6084c195439f9a1f9f3a0130e6e7#b97b6084c195439f9a1f9f3a0130e6e7</guid>
		<dc:creator>Maddus Mattus</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Maddus Mattus/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Select-Case-behavior#cfe6fb7b50d53430db0469f3a01300e60">spivonious</a>: add to that, the propensity for the previous developers to do this:</p><p>&nbsp;</p><p><pre class="brush: text">   Select Case True
    Case X = 1
    Case X = 2
    Case Else
         'Do Something HereEnd Select</pre></p><p>instead of</p><p><pre class="brush: vb">If X &lt;&gt; 1 AndAlso X &lt;&gt; 2 Then
    'do something here
End If</pre></p><p>I frikkin hate 'clever' code.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/3011353eeaff426084909f3a01325cf2#3011353eeaff426084909f3a01325cf2</link>
		<pubDate>Tue, 09 Aug 2011 18:35:26 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/3011353eeaff426084909f3a01325cf2#3011353eeaff426084909f3a01325cf2</guid>
		<dc:creator>ScanIAm</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/ScanIAm/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>It has its uses though.</p><p>First one to be true in the following order, or fall through, (And it's inverse)</p><p><pre class="brush: text">Select Case True
Case X Is GetType(Double)
Case X Is GetType(Single)
</pre></p><p>&nbsp;</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/75d7bcebbcff40229f5b9f3a013620c9#75d7bcebbcff40229f5b9f3a013620c9</link>
		<pubDate>Tue, 09 Aug 2011 18:49:08 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/75d7bcebbcff40229f5b9f3a013620c9#75d7bcebbcff40229f5b9f3a013620c9</guid>
		<dc:creator>Adam Speight</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/AdamSpeight2008/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Select-Case-behavior#ca3b3d366509c44ab82ae9f3a0124c50e">ScanIAm</a>: Living in a Hybrid code world of&nbsp; Vb.net, C#, VB6, PowerBuilder (Yes&nbsp;businesses still depend on the&nbsp;programs&nbsp;developed in them...), Php/Python and occasionally Java ... i understand&nbsp;your frustration when switching between projects and syntaxes .... trying to catch the obvious bug <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-7.gif?v=c9' alt='Perplexed' /></p><p>and thanks for bringing up the &quot;AndAlso&quot; operator .. which i had forgotten completely ...</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/8522464c4ae64b148caf9f3b004839a4#8522464c4ae64b148caf9f3b004839a4</link>
		<pubDate>Wed, 10 Aug 2011 04:22:57 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/8522464c4ae64b148caf9f3b004839a4#8522464c4ae64b148caf9f3b004839a4</guid>
		<dc:creator>xgamer</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/xgamer/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Select-Case-behavior/3011353eeaff426084909f3a01325cf2">9 hours&nbsp;ago</a>,<a href="/Niners/ScanIAm">ScanIAm</a> wrote</p><p>@<a href="/Forums/Coffeehouse/Select-Case-behavior#cfe6fb7b50d53430db0469f3a01300e60">spivonious</a>: add to that, the propensity for the previous developers to do this:</p><p>&nbsp;</p><div class="syntaxhighlighterHolder"><div id="highlighter_727408" class="syntaxhighlighter text"><table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div><div class="line number2 index1 alt1">2</div><div class="line number3 index2 alt2">3</div><div class="line number4 index3 alt1">4</div><div class="line number5 index4 alt2">5</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="text plain">Select Case True</code></div><div class="line number2 index1 alt1"><code class="text spaces">&nbsp;</code><code class="text plain">Case X = 1</code></div><div class="line number3 index2 alt2"><code class="text spaces">&nbsp;</code><code class="text plain">Case X = 2</code></div><div class="line number4 index3 alt1"><code class="text spaces">&nbsp;</code><code class="text plain">Case Else</code></div><div class="line number5 index4 alt2"><code class="text spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="text plain">'Do Something HereEnd Select</code></div></div></td></tr></tbody></table></div></div><p>instead of</p><div class="syntaxhighlighterHolder"><div id="highlighter_743937" class="syntaxhighlighter vb"><table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div><div class="line number2 index1 alt1">2</div><div class="line number3 index2 alt2">3</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="vb keyword">If</code> <code class="vb plain">X &lt;&gt; 1 </code><code class="vb keyword">AndAlso</code> <code class="vb plain">X &lt;&gt; 2</code><code class="vb keyword">Then</code></div><div class="line number2 index1 alt1"><code class="vb spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="vb comments">'do something here</code></div><div class="line number3 index2 alt2"><code class="vb keyword">End</code> <code class="vb keyword">If</code></div></div></td></tr></tbody></table></div></div><p>I frikkin hate 'clever' code.</p><p></p></div></blockquote><p></p><p>I sometimes use a do { } while (false) &quot;loop&quot;.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/117cc4dba4644e6297009f3b004f99b4#117cc4dba4644e6297009f3b004f99b4</link>
		<pubDate>Wed, 10 Aug 2011 04:49:48 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/117cc4dba4644e6297009f3b004f99b4#117cc4dba4644e6297009f3b004f99b4</guid>
		<dc:creator>cbae</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/cbae/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>@<a href="http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior#c8522464c4ae64b148caf9f3b004839a4">xgamer</a>:</p><p>And = &amp;</p><p>AndAlso = &amp;&amp;</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/6a478ff9f53b454e92fd9f3b00ee02b0#6a478ff9f53b454e92fd9f3b00ee02b0</link>
		<pubDate>Wed, 10 Aug 2011 14:26:34 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/6a478ff9f53b454e92fd9f3b00ee02b0#6a478ff9f53b454e92fd9f3b00ee02b0</guid>
		<dc:creator>Scott</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/spivonious/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Select-Case-behavior#c6a478ff9f53b454e92fd9f3b00ee02b0">spivonious</a>: That's another area of problem when switching between languages as unlike C# in C/PHP/Python .. &quot;&amp;&quot; operator is&nbsp;bit wise&nbsp;operator ... hence I normally use the generic C like operators in most of the languages following C like syntax viz. Java, PHP, &nbsp;partly Python ... &nbsp;here vb.net is easier as the confusion between operator is minimum due to its own unique syntax ...</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/e7f6d8e23c4d4622b1969f3b0122d9c1#e7f6d8e23c4d4622b1969f3b0122d9c1</link>
		<pubDate>Wed, 10 Aug 2011 17:38:57 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/e7f6d8e23c4d4622b1969f3b0122d9c1#e7f6d8e23c4d4622b1969f3b0122d9c1</guid>
		<dc:creator>xgamer</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/xgamer/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Select-Case-behavior/117cc4dba4644e6297009f3b004f99b4">13 hours&nbsp;ago</a>,<a href="/Niners/cbae">cbae</a> wrote</p><p>*snip*</p><p>I sometimes use a do { } while (false) &quot;loop&quot;.</p><p></p></div></blockquote><p></p><p><a href="http://cdn.smosh.com/smosh-pit/032011/seewhat-tobey.jpg" rel="lightbox"><img src="http://cdn.smosh.com/smosh-pit/032011/seewhat-tobey.jpg" alt="" width="262" height="288"></a></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/779f8abb78e84a7280ab9f3b0134994c#779f8abb78e84a7280ab9f3b0134994c</link>
		<pubDate>Wed, 10 Aug 2011 18:43:34 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/779f8abb78e84a7280ab9f3b0134994c#779f8abb78e84a7280ab9f3b0134994c</guid>
		<dc:creator>ScanIAm</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/ScanIAm/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>Is there any language that lets your write something like</p><p><pre class="brush: vb">If x is not 2 or 3</pre></p><p>instead of</p><p><pre class="brush: csharp">If x != 2 &amp;&amp; x != 3?</pre></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/3a452a3cf12445b48cb19f3b0141feea#3a452a3cf12445b48cb19f3b0141feea</link>
		<pubDate>Wed, 10 Aug 2011 19:32:21 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/3a452a3cf12445b48cb19f3b0141feea#3a452a3cf12445b48cb19f3b0141feea</guid>
		<dc:creator>Scott</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/spivonious/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Select-Case-behavior#c3a452a3cf12445b48cb19f3b0141feea">spivonious</a>: T-SQL comes to mind.</p><p>where&nbsp;@x not in (2,3)</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/170261a530d247419d3e9f3b01656f7d#170261a530d247419d3e9f3b01656f7d</link>
		<pubDate>Wed, 10 Aug 2011 21:41:22 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/170261a530d247419d3e9f3b01656f7d#170261a530d247419d3e9f3b01656f7d</guid>
		<dc:creator>Dave Williamson</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/davewill/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>It not that hard to implement with an extension method. Note though IsNot is a keyword in vb.net, hence the square braces.</p><p><pre class="brush: vb">Public Module ExtsMethods
 &lt;System.Runtime.CompilerServices.Extension()&gt;Public Function [IsNot](ByVal Value As Integer, ParamArray Values() As Integer) As Boolean
  Return Not Values.Contains(Value)

End Function

End Module</pre></p><p>&nbsp;</p><p><pre class="brush: vb">If x.[IsNot](2,3) Then</pre></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/99f733f60db64c0ea6449f3b01753de9#99f733f60db64c0ea6449f3b01753de9</link>
		<pubDate>Wed, 10 Aug 2011 22:38:55 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/99f733f60db64c0ea6449f3b01753de9#99f733f60db64c0ea6449f3b01753de9</guid>
		<dc:creator>Adam Speight</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/AdamSpeight2008/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p><div><p>@<a href="/Forums/Coffeehouse/Select-Case-behavior#c3a452a3cf12445b48cb19f3b0141feea">spivonious</a>:</p></div><p>FoxPro has a function called INLIST(), which works with various types, not just integer types.</p><p>My C# equivalent uses an extension method like Adam's, but uses a generic method to support multiple types like FoxPro's INLIST():</p><p><pre class="brush: csharp">public static class ExtClass
{
    public static bool IsInList&lt;T&gt;(this T origval, params T[] searchlist)
    {
        return searchlist.Contains(origval);
    }
}</pre></p><p>Speaking of &quot;clever&quot; code, I remember seeing VFP code like this:</p><p><pre class="brush: text">FUNCTION ValidateAll(cSomething1, cSomething2, cSomething3)
RETURN !INLIST(.F., ValFunc1(cSomeValue), ValFunc2(cSomething2), ValFunc3(cSomething3))
ENDFUNC</pre></p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/e4be9ca1f4634bcda1a09f3b01839496#e4be9ca1f4634bcda1a09f3b01839496</link>
		<pubDate>Wed, 10 Aug 2011 23:31:08 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/e4be9ca1f4634bcda1a09f3b01839496#e4be9ca1f4634bcda1a09f3b01839496</guid>
		<dc:creator>cbae</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/cbae/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>Great. The code tag is broken again.</p><p>Edit: False alarm. Apparently, my code sample combined with spinovious' code sample in the same post causes some rendering issues.&nbsp;</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/805131179634443da14e9f3b0183f1c5#805131179634443da14e9f3b0183f1c5</link>
		<pubDate>Wed, 10 Aug 2011 23:32:27 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/805131179634443da14e9f3b0183f1c5#805131179634443da14e9f3b0183f1c5</guid>
		<dc:creator>cbae</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/cbae/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p>@<a href="/Forums/Coffeehouse/Select-Case-behavior#c3a452a3cf12445b48cb19f3b0141feea">spivonious</a>:<pre class="brush: csharp">if (!(x == 2 || x == 3))</pre></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/f6daac1a0f6a4b6e9e609f3c000a558e#f6daac1a0f6a4b6e9e609f3c000a558e</link>
		<pubDate>Thu, 11 Aug 2011 00:37:37 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/f6daac1a0f6a4b6e9e609f3c000a558e#f6daac1a0f6a4b6e9e609f3c000a558e</guid>
		<dc:creator>Frank Hileman</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Frank Hileman/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Select-Case-behavior/e7f6d8e23c4d4622b1969f3b0122d9c1">12 hours&nbsp;ago</a>,<a href="/Niners/xgamer">xgamer</a> wrote</p><p>@<a href="/Forums/Coffeehouse/Select-Case-behavior#c6a478ff9f53b454e92fd9f3b00ee02b0">spivonious</a>: That's another area of problem when switching between languages as unlike C# in C/PHP/Python .. &quot;&amp;&quot; operator is&nbsp;bit wise&nbsp;operator ... hence I normally use the generic C like operators in most of the languages following C like syntax viz. Java, PHP, &nbsp;partly Python ... &nbsp;here vb.net is easier as the confusion between operator is minimum due to its own unique syntax ...</p><p></p></div></blockquote><p></p><p>Actually, for all practical purposes the semantics of &amp; are the same in C and C#.</p><p>Not that it matters much; there shouldn't be a good reason to prefer &amp; to the short-circuiting &amp;&amp; when dealing with boolean values (and when there is, your code probably contains a problem waiting to happen).</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/820d0c0535a4412c8f699f3c0068e682#820d0c0535a4412c8f699f3c0068e682</link>
		<pubDate>Thu, 11 Aug 2011 06:21:55 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/820d0c0535a4412c8f699f3c0068e682#820d0c0535a4412c8f699f3c0068e682</guid>
		<dc:creator>Blue Ink</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Blue Ink/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Select-Case-behavior/820d0c0535a4412c8f699f3c0068e682">4 hours&nbsp;ago</a>,<a href="/Niners/Blue%20Ink">Blue&nbsp;Ink</a> wrote</p><p>Not that it matters much; there shouldn't be a good reason to prefer &amp; to the short-circuiting &amp;&amp; when dealing with boolean values.</p><p></p></div></blockquote><p></p><p>The boolean value could be result of a side effecting function. Or the evaluate of each takes a while. Why even evaluate the second argument if you don't need to?</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/76884aa5c89643aeb67d9f3c00b6aee5#76884aa5c89643aeb67d9f3c00b6aee5</link>
		<pubDate>Thu, 11 Aug 2011 11:05:07 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/76884aa5c89643aeb67d9f3c00b6aee5#76884aa5c89643aeb67d9f3c00b6aee5</guid>
		<dc:creator>Adam Speight</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/AdamSpeight2008/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Select-Case-behavior/820d0c0535a4412c8f699f3c0068e682">7 hours&nbsp;ago</a>,<a href="/Niners/Blue%20Ink">Blue&nbsp;Ink</a> wrote</p><p>Not that it matters much; there shouldn't be a good reason to prefer &amp; to the short-circuiting &amp;&amp; when dealing with boolean values (and when there is, your code probably contains a problem waiting to happen).</p><p></p></div></blockquote><p></p><p>Timing attacks on security functions <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /> Some functions should never exit early on failure - comparing hash values for example.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/a67a0e2381b24af2b5cf9f3c00e721c8#a67a0e2381b24af2b5cf9f3c00e721c8</link>
		<pubDate>Thu, 11 Aug 2011 14:01:31 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/a67a0e2381b24af2b5cf9f3c00e721c8#a67a0e2381b24af2b5cf9f3c00e721c8</guid>
		<dc:creator>blowdart</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/blowdart/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Select-Case-behavior/76884aa5c89643aeb67d9f3c00b6aee5">9 hours&nbsp;ago</a>,<a href="/Niners/AdamSpeight2008">Adam​Speight2008</a> wrote</p><p>*snip*</p><p>The boolean value could be result of a side effecting function. Or the evaluate of each takes a while. Why even evaluate the second argument if you don't need to?</p><p></p></div></blockquote><p></p><p>That was my point exactly. By using &amp; instead of &amp;&amp;, either you are wasting time, or your code relies on obscure side-effects.&nbsp;Neither is desirable, unless you are dealing with...</p><p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Select-Case-behavior/a67a0e2381b24af2b5cf9f3c00e721c8">6 hours&nbsp;ago</a>,<a href="/Niners/blowdart">blowdart</a> wrote</p><p>*snip*</p><p>Timing attacks on security functions <img src="http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9" alt="Smiley"> Some functions should never exit early on failure - comparing hash values for example.</p><p></p></div></blockquote><p></p><p>This is a legitimate case where short-circuiting is undesirable, and that can also happen elsewhere (for instance, time sensitive code in firmware). Yet, in these cases I prefer not to rely on a subtle difference and express my intent more clearly. Maintenance happens.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/5b475066e49743fd9c1c9f3c016513dd#5b475066e49743fd9c1c9f3c016513dd</link>
		<pubDate>Thu, 11 Aug 2011 21:40:04 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/5b475066e49743fd9c1c9f3c016513dd#5b475066e49743fd9c1c9f3c016513dd</guid>
		<dc:creator>Blue Ink</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Blue Ink/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Select-Case-behavior/a67a0e2381b24af2b5cf9f3c00e721c8">1 day&nbsp;ago</a>,<a href="/Niners/blowdart">blowdart</a> wrote</p><p>*snip*</p><p>Timing attacks on security functions <img src="http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9" alt="Smiley"> Some functions should never exit early on failure - comparing hash values for example.</p><p></p></div></blockquote><p></p><p>Every time you write your own hash function a cryptographer somewhere cries.</p><p>&nbsp;</p><p>@Blue Ink: If you're writing hardware code that is timing sensitive and writing it in something other than C or assembly, then you're doing it wrong.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/d7a3d840b8c54e4cba819f3e00ae4d65#d7a3d840b8c54e4cba819f3e00ae4d65</link>
		<pubDate>Sat, 13 Aug 2011 10:34:36 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/d7a3d840b8c54e4cba819f3e00ae4d65#d7a3d840b8c54e4cba819f3e00ae4d65</guid>
		<dc:creator>evildictaitor</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/evildictaitor/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Select-Case-behavior/d7a3d840b8c54e4cba819f3e00ae4d65">1 hour&nbsp;ago</a>,<a href="/Niners/evildictaitor">evildictait​or</a> wrote</p><p>*snip*</p><p>Every time you write your own hash function a cryptographer somewhere cries.</p><p>&nbsp;</p><p>@Blue Ink: If you're writing hardware code that is timing sensitive and writing it in something other than C or assembly, then you're doing it wrong.</p><p></p></div></blockquote><p></p><p>Obviously. And using C would still expose you to the subtle difference between eager and short-circuit operators... unfortunately mine wasn't an academic example.</p><p>As for the other comment, I think the hash function has little to do with what blowdart was referring to. If you use a method that fails early (such as short-circuit evaluation, or even just memcmp) when comparing some secret value with another submitted by the attacker, you may be giving away how much of the submitted value is correct. It's the same as making a combination lock that emits&nbsp;a louder tick whenever you hit on a partial result.</p><p>In the end, someone&nbsp;may cry, but it won't necessarily be a cryptographer.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/e2e50cd2a63942929c379f3e00d19a1b#e2e50cd2a63942929c379f3e00d19a1b</link>
		<pubDate>Sat, 13 Aug 2011 12:43:08 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/e2e50cd2a63942929c379f3e00d19a1b#e2e50cd2a63942929c379f3e00d19a1b</guid>
		<dc:creator>Blue Ink</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Blue Ink/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Select-Case-behavior/d7a3d840b8c54e4cba819f3e00ae4d65">4 hours&nbsp;ago</a>,<a href="/Niners/evildictaitor">evildictait​or</a> wrote</p><p>*snip*</p><p>Every time you write your own hash function a cryptographer somewhere cries...</p><p></p></div></blockquote><p></p><p>...and becomes so distraught that he kills a kitten.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/6bb15404a44b4480b7dd9f3e00f28c6e#6bb15404a44b4480b7dd9f3e00f28c6e</link>
		<pubDate>Sat, 13 Aug 2011 14:43:05 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/6bb15404a44b4480b7dd9f3e00f28c6e#6bb15404a44b4480b7dd9f3e00f28c6e</guid>
		<dc:creator>cbae</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/cbae/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Select Case behavior</title>
		<description><![CDATA[<p></p><blockquote><div class="quoteText"><p></p><p><a class="permalink" title="Post Permalink" href="/Forums/Coffeehouse/Select-Case-behavior/6bb15404a44b4480b7dd9f3e00f28c6e">10 hours&nbsp;ago</a>,<a href="/Niners/cbae">cbae</a> wrote</p><p>*snip*</p><p>...and becomes so distraught that he kills a kitten.</p><p></p></div></blockquote><p></p><p>Oh no, that's when you call hashing encryption ....</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/da8d89c6103742aa9f059f3f0010a57e#da8d89c6103742aa9f059f3f0010a57e</link>
		<pubDate>Sun, 14 Aug 2011 01:00:36 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/Select-Case-behavior/da8d89c6103742aa9f059f3f0010a57e#da8d89c6103742aa9f059f3f0010a57e</guid>
		<dc:creator>blowdart</dc:creator>
		<slash:comments>37</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/blowdart/Discussions/RSS</wfw:commentRss>
	</item>
</channel>
</rss>