<?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>VB Catch ... When: Why so special?</title><link>http://blogs.msdn.com/vbteam/archive/2008/10/09/vb-catch-when-why-so-special.aspx</link><description>The VB Catch syntax has a unique feature: When. It allows users to filter expressions based on something other than their type. Any arbitrary code can enter a When block to decide whether or not to handle an Exception. Sub Sub1() Try DoSomeAction() Catch</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: VB Catch ... When: Why so special?</title><link>http://blogs.msdn.com/vbteam/archive/2008/10/09/vb-catch-when-why-so-special.aspx#8994272</link><pubDate>Fri, 10 Oct 2008 16:50:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8994272</guid><dc:creator>int19h</dc:creator><description>&lt;p&gt;There's also the convenience part of it. In C# catch-rethrow solution, with default VS settings, it won't break on the original throw down the stack (because it's caught upwards), but it will break on rethrow if the filter fails, because that one is uncaught. On VB, if the filter fails, there is quite literally no catch, and the debugger correctly breaks on the line that originally threw the exception.&lt;/p&gt;
</description></item><item><title>re: VB Catch ... When: Why so special?</title><link>http://blogs.msdn.com/vbteam/archive/2008/10/09/vb-catch-when-why-so-special.aspx#9000044</link><pubDate>Wed, 15 Oct 2008 00:03:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9000044</guid><dc:creator>Ted</dc:creator><description>&lt;p&gt;Please deprecate this feature in VB. &amp;nbsp;Keep VB and C# consistent. &amp;nbsp;The minimal reduction in the number of lines of code is outweighed by the extra effort you need to understand/maintain the code.&lt;/p&gt;
</description></item><item><title>re: VB Catch ... When: Why so special?</title><link>http://blogs.msdn.com/vbteam/archive/2008/10/09/vb-catch-when-why-so-special.aspx#9000544</link><pubDate>Wed, 15 Oct 2008 14:08:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9000544</guid><dc:creator>int19h</dc:creator><description>&lt;p&gt;Er... you want to deprecate an immensely useful VB feature just because C# doesn't have it? How about spending 5 minutes (you know, the amount it takes to type &amp;quot;Where&amp;quot; in MSDN Library index and glance at the first paragraph of the article that opens) to learn the language you end up coding in?&lt;/p&gt;
&lt;p&gt;If anything, I'd rather ask to have that feature in C#. And I'm really a C# programmer, not a VB one.&lt;/p&gt;
</description></item><item><title>re: VB Catch ... When: Why so special?</title><link>http://blogs.msdn.com/vbteam/archive/2008/10/09/vb-catch-when-why-so-special.aspx#9455071</link><pubDate>Mon, 02 Mar 2009 23:19:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9455071</guid><dc:creator>Daniel Earwicker</dc:creator><description>&lt;p&gt;The real value of this is that when an exception is being filtered, nested finally blocks are not run first. If they run, they corrupt the program state or cause further problems, before you can examine the original one. That is what happens when you try to filter exceptions with catch/throw. It is vital to have exception filtering for this reason. C# is incomplete without it.&lt;/p&gt;
</description></item><item><title>re: VB Catch ... When: Why so special?</title><link>http://blogs.msdn.com/vbteam/archive/2008/10/09/vb-catch-when-why-so-special.aspx#9858152</link><pubDate>Wed, 05 Aug 2009 18:41:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9858152</guid><dc:creator>TedsAnIdiot</dc:creator><description>&lt;p&gt;Yeah, deprecate the more evolved functionality... &amp;nbsp;My name says it all.&lt;/p&gt;
</description></item></channel></rss>