Monthly Archives: May 2010

C# Logging Using Trace

If you’ve never used Tracing in your .NET applications, it can be tricky remembering the steps. I present the following snippet as a quick guide to get you on your way. Firstly, add a switch to your App.Config file. The … Continue reading

Posted in Reference | Tagged | Leave a comment

C# Null-Coalescing Operator

The ?? operator allows you to specify a default value when a nullable type is assigned to a non-nullable type. Let’s define a nullable int, using the Nullable shorthand: By using the ?? operator we can assign x to y … Continue reading

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

WPF Icon Previewer

Download WPFIconPreview.zip (21 KB) I’ve begun using Xaml-based icons in my WPF applications, but I’ve found that I didn’t have any tools to preview them with. There are probably plenty of tools already available, but I couldn’t resist the challenge… … Continue reading

Posted in Projects | Tagged , | 3 Comments

WPF Notepad

Download WPFNotepad.zip (21 KB) When learning a new language it helps to have mini-projects to keep you focused. This is my first mini-project; notepad in WPF. This brings together ideas from my previous two posts into one application. Full source … Continue reading

Posted in Projects | Tagged , | Leave a comment