Geeks With Blogs
Eron Wright - All Killer No Filler blog April 2004 Entries
C#: try..catch Usage
When catching an exception in C# you need not declare a variable for the exception instance if you do not need it. This will avoid the “unused variable” warning. try { /* ... */ } catch(Exception) // catches without assigning to a variable { // ... } Here is how to rethrow an exception without affecting the stack trace: try { /* ... */ } catch(System.Data.SqlClient... ex) { if(ex.Number==2627) { /* special case for primary key violation */ } else throw; // rethrows without affecting ......

Posted On Friday, April 16, 2004 9:41 AM

Shell Extensions with .NET
Edamno has released a VB.NET library for creating various shell extensions Browser Helper Objects Context Menu Handlers IE Menu Buttons InfoTips Property Sheets Thumbnails He also has a library for working with Windows Task Scheduler, and, most importantly, a library for working with OLE Structured Storage. Now you can read and write the author and comments associated with a file ......

Posted On Saturday, April 10, 2004 8:52 AM

Copyright © Eron Wright | Powered by: