WPF: FileDialogs on Vista 64-bit, use the Manifest!

Rick Brewster made this comment on my previous post about the Inconsistent FileDialogs. So I decided to fire up his solution: I’ve created an empty WPF project, with a Window called ‘Main’ with the following code: using System.Windows; using Microsoft.Win32; namespace OpenFileDialogNewStyle { /// /// Interaction logic for Main.xaml /// public partial class Main : […]

A fluent approach to C# parameter validation

Normally I don’t do this, but since this is such a great article: http://blog.getpaint.net/2008/12/06/a-fluent-approach-to-c-parameter-validation/ From the creator of Paint.NET. It’s really worth reading, if you do a lot of parameter validation. It might come in handy for your forms, or maybe even for a website. I think I’ll write something based on that really soon […]

Linq To Entities with a SQL Compact Database

A while ago I wrote this (Dutch) article on how to perform LINQ to SQL for your SQL Compact databases, since Visual Studio did not understand this, we had to do it manually, as described in the article just mentioned. But since the release of .NET Framework 3.5 SP1, and the therein included ADO.NET Entity […]

C#: Smaller syntax for event handlers.

Using lambda functions you can shorten your event handlers. E.g.: With a normal event hander: class Test { private Timer timer; private void Timer_Elapsed(object sender, ElapsedEventArgs e) { Console.WriteLine(string.Format(“Object: {0} sends: {1}”, sender, e)); } public Test() { this.timer = new Timer(); this.timer.Elapsed += new ElapsedEventHandler(this.Timer_Elapsed); this.timer.Interval = 100; this.timer.Start(); } } With an anonymous […]

CodeRush Express – Useful tool for C# developers in VS.NET 2K8

(I quote): Developer Express and Microsoft are proud to announce a new version of CodeRush licensed exclusively for C# developers working in Visual Studio. The new product is called CodeRush Xpress, and it includes a fresh selection of hand-picked features taken from CodeRush and Refactor! Pro. And I love it! It has very handy functions […]

SQL Server Management Studio Express 2005 Security Error (29506)

Should you ever want to install SQL Server Management Studio Express 2005 you MUST run it as Administrator. When you try to install it on Vista (by double clicking the .exe) it extracts the files to a temp folder. Then it launches the setup, asking you some questions. After that UAC asks you to gain […]