Beware Singletons that Raise Events

It’s pretty well documented that one of the most common ways in which a .NET application can “leak” memory stems failing to unsubscribe from events when the subscription is no longer needed. This answer to a Stack Overflow question on memory leaks in C# describes the issue very succinctly: Event […]

image_thumb_2_thumb.png

YAGNI and Professional Code

I’ve heard (and used) YAGNI (You Ain’t Gonna Need It) quite often in my software development career. It’s a battle cry for shipping a minimum viable product and letting the real-world usage dictate what new features and improvements are really needed. Generally speaking I think that this ruthless minimalism is […]


Finding Memory Leaks in .NET Compact Framework Applications

This post is a collection of my findings from a recent effort to eliminate memory leaks in a .NET Compact Framework (CF .NET) application. All of the information in this post is available elsewhere on the web but after spending a lot of time pulling it all together for my […]


Converting VB .NET to C#: A Post Mortem

For the past few years I’ve been working with a fairly large ASP .NET web application. The app began its life as Classic ASP and was later ported to ASP .NET web forms written in VB .NET. Over the years the language preference of the development team shifted and we […]


API Message Localization

In my post, “Keep Localizable Strings Close To Your Users” I talked about the internationalization and localization difficulties that can arise when you sprinkle static localizable strings throughout the different logical layers of an application. The main point of that post is that you should have your localizable strings reside […]


On StringComparison Values

When you use the .NET Framework’s String.Equals and String.Compare methods do you use an overloStringComparison enumeration value? If not, you should be because the value provided for that StringComparison argument can have a big impact on the results of your string comparison. The StringComparison enumeration defines values that fall into […]


Null Values And The T-SQL IN Operator

I came across some unexpected behavior while troubleshooting a failing test the other day that took me long enough to figure out that I thought it was worth sharing here. I finally traced the failing test back to a SELECT statement in a stored procedure that was using the IN […]


Using Table-Valued Parameters With SQL Server Reporting Services 1

In my last post I talked about using table-valued parameters to pass a list of integer values to a stored procedure without resorting to using comma-delimited strings and parsing out each value into a TABLE variable. In this post I’ll extend the “Customer Transaction Summary” report example to see how […]


Using Table-Valued Parameters in SQL Server

I work with stored procedures in SQL Server pretty frequently and have often found myself with a need to pass in a list of values at run-time. Quite often this list contains a set of ids on which the stored procedure needs to operate the size and contents of which […]


Keep Localizable Strings Close To Your Users

Much has been written about the technical ins and outs of localizing .NET applications with ResX files, but I think that most treatments of the topic understate the difficulty involved in localizing a project of substantial size and complexity. You probably already know how to define and consume global and […]