Browsing All posts tagged under »try«

Two (useless but potentially) interesting tid-bits

April 29, 2008

0

Try-Catch-Finally A try-catch-finally is converted into IL by the C# compiler as a try-catch inside the try block of another try-finally. This allows for finally block to execute even when exceptions are raised in the catch block. Use ildasm and check it out yourself! throw football; Though you cannot throw an arbitrary managed object as… [Read more…]

The empty try block mystery

April 10, 2008

17

Problem: I had used .NET Mass Downloader tool to download .NET 2.0 Framework sourcecode some time ago. While reading Timer.cs (System.Windows.Forms.Timer) and a couple of other classes I noticed something interesting. Does the following piece of code look odd to you? Notice the empty “try” block and all processing being done in the “finally” block.… [Read more…]

Follow

Get every new post delivered to your Inbox.