This post is in Draft Mode - it will not appear on the site or in search results

SQL Like IsNull For .NET

http://technet.microsoft.com/en-us/library/ms184325.aspx

ISNULL ( check_expression , replacement_value )

Public Function IsNull(Of T)(ByVal currentvalue As T, ByVal defaultValue As T) As T
    Return If(currentvalue Is Nothing, defaultValue, currentvalue)
End Function

https://gist.github.com/eithe/5589891