?? Operator (C# Reference)

This operator allows you to supply an alternative value if the value being supplied is null. It only works on nullable datatypes but with a bit of googling came accross this article.

public int CurrentPage
{
    get
    {
        return (int)(ViewState["_CurrentPage"] ?? 0);
    }
    set
    {
        this.ViewState["_CurrentPage"] = value;
    }
}

The offical Microsoft article

Great site to help pick colour scheme for sites

Here is a great site for helping to choose colour schemes for websites.

Iterate a Dictionary

Following code iterates through each entry in a dictory

For Each keyPair As KeyValuePair(Of String, Int32) In aDepot.PostcodeCounters
    builder.Append("<tr><td>")
    builder.Append(keyPair.Key)
    builder.Append("</td><td align=""right"">")
    builder.Append(keyPair.Value)
    builder.Append("</td></tr>")
Next

Accessing SQL 2005 from Visual Studio 2008

If you are attempting to add a data connection to a SQL 2005 database within visual studio 2008 you might encounter the following error…

Could not load file or assembly ‘Microsoft.SqlServer.Management.Sdk.Sfc, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91′ or one of its dependencies. The system cannot find the file specified.

You need to install the following…

Microsoft SQL Server System CLR Types
Microsoft SQL Server 2008 Management Objects

They can be found here as part of the SQL Server 2008 Feature Pack.

iPhone Development starter book

If you want to get into iPhone development this is a great book to start from Beginning iPhone Development by apress