Monthly Archives: September 2010

C# Custom Event Handlers

Here’s a quick example for creating custom event handlers in C#. We start by creating our EventArgs object. This should inherit from the standard EventArgs class, and include the properties we want to pass when the event is fired: Next, … Continue reading

Posted in Reference | Tagged | Leave a comment

Detecting the Debugger

I’ve just discovered that .NET has a very quick way to detect when the debugger is attached. This has been so handy the past few days, and it works both for WinForms and ASP.NET…

Posted in Tips and Tricks | Tagged , | Leave a comment

ASP.NET Creating User Controls Programatically

User Controls are a great way to share functionality between pages, but sometimes you may want to create one on-the-fly. Although simple to do, there is a trick to doing this… The User Control Add a new user control to … Continue reading

Posted in Uncategorized | Tagged | 1 Comment