Cast vs ‘as’

What’s the difference?

object dinner = new Dinner();
Dinner myDinner2 = (Dinner) dinner;
Dinner myDinner = dinner as Dinner;

Well, the first cast (which is really a cast) throws an error if dinner is null.

The second one doesn’t, so you have to check that by yourself.

Also see the MSDN reference on the ‘as’ keyword.

Web Platform Installer Detection bug

I’ve been using Microsoft Web Platform Installer for a while. It’s a great tool to install everything you need for web development, it installs SQL Server for you without bugging you with difficult questions. (on a side note: if you want to move your SQL DATA folder look at this post).

But there is a small problem when you launch the Web Platform Installer . It suggests you install Microsoft Visual Studio 2008 Web Developer Express Edition:

web pi

But when I check my Visual Studio:

vs.net

It’s already installed.

Better file a bug on Connect :P