C#

Synchronising Sheep (Using LINQ)

LINQ to Objects in C# has been around for a while now – and yet I’m regularly amazed at how easy LINQ has made it to perform what would have previously been fairly tedious tasks (well unless you were very clever and had written your own set of IEnumerable helper methods)  - like the following – where I needed to synchronise a list of records in a database…

Category

Projects

I’m pretty sure that anyone who actually likes to ‘make stuff’ and has been a programmer at least once in their life – has got a short list of pet projects that he/she has started – and maybe even finished :-) Here are a few of my ‘pets’. CodeDom class generator for VS2005/2008

Category

How to Compile a WPF Application as a Class Library

Charles Petzold’s book, Applications = Code + Markup - received some critical press for not being very pretty. And it’s true that there’s a lot of text and code listings but (and as you’ll see below), he was methodical. I recently wanted to upgrade a Windows Live Writer plug-in I’d written to use the Windows Presentation Framework (WPF) – instead of WinForms and a custom UI library. However my first attempt to compile the application as a Class Library resulted in the following error…

Category

Comments

SyntaxHighlighter Plugin for Windows Live Writer

Alex Gorbatchev has done a great job with version 2.0 of his excellent JavaScript SyntaxHighlighter. And I’ve just updated my code snippet plugin for Windows Live Writer – with SyntaxHighlighter 2.0 support, as well as a new desktop application – useful for pasting code snippets into other apps.. like stackoverflow.com (CTRL-A to select all – and then >> to indent four spaces before pasting into stackoverflow).

Category

A UI and Culture Friendly Replacement for Enumeration Types

Using an enumeration to display a list of values in the user interface (UI) has obvious limitations. You'll be limited to the rules of enumeration values - no spaces, multi-words etc. You won't be able to offer localized versions of the strings used to describe each enumeration value. And you'll have to hard code and parse all possible values in order to present a list of values in a UI element.

Category
Subscribe to C#