IEnumerable<T> Paging with LINQ

Simplify your LINQ pagination

I am a big fan of LINQ to Objects, especially when it comes to working with collections.

Handling Unhandled ASP.NET Exceptions

Gain insight into your 500 errors

At some point in their career everyone who creates ASP.NET applications has had issues with their site throwing exceptions that aren't trapped.  We end up displaying a friendly error page at best, and at worst display the yellow ASP.NET error screen of death.  Generally speaking it's best practice to configure your ASP.NET application to use friendly error pages so that your users aren't presented with an exception and stack trace that are meaningless to them.

System.Nullable vs. TryParse Revisited

Navigating TryParse with nullable types

As a follow-up to my system.nullable vs. tryparse post, I've posted the source code for the nullable parser. I use this code in nearly all of my projects to help with parsing nullable values. It makes parsing nullable objects much easier, and mirrors the functionality of the existing TryParse methods that the framework has made us accustomed to.

Writing an Installer Class for a Visual Studio Addin

Easy Visual Studio addin installation

You've struggled through understanding commands and toolbars, pulled your hair out deciphering confusing API's, and scarred your neighborhood with red-faced screams of frustration as you debug unhandled exceptions that crash visual studio.  After weeks, months or yes even years polishing an addin you still aren't finished until you create an installer program.

Visual Studio 2008 Extension Methods

This is excerpt about this blog post!

Now that visual studio.net 2008 has been released developers have a much improved development environment and framework to produce high quality code with.  Extension methods are one of the new framework and IDE features that provides a powerful and clever method of extending objects that you do not have source code for or otherwise can't directly extend.

Nullable Types and ADO.NET Parameters

Hello there null coalescing operator

As most people are aware the .NET 2.0 framework supports nullable value types.  There are many articles on this topic and a few that address the issues of using nullable types in combination with your ado.net code.  However, most of these discuss the issue of using nullable types in combination with the DbDataReader objects, though few address the conflicts that arise when using a nullable type to set or get an ado.net parameter value.

System.Nullable vs. TryParse

Navigating TryParse with nullable types

I've been working on some code tonight and needed to use the trusty struct.TryParse methods available in the core framework.  Unfortunately, the built in TryParse methods choke on nullable types.  After a frightfully short google search I ran across a blog entry from Steve Michelotti describing his approach to writing his own TryParse object for nullable types.  Its pretty sweet though it didn't meet a specific need that I had, specifically the ability to have the result parameter have its value set to null in cases where the string passed in is in fact null (or empty).