IsNull extension method for C# and VB.NET.
Simple but very usefull!
Sample C#
public static bool IsNull(this object input) { return input== null; }
Sample VB.NET
<System.Runtime.CompilerServices.Extension> _ Public Shared Function IsNull(input As Object) As Boolean Return input Is Nothing End Function
Usage (c#)
if (!myObject.IsNull()) { // do something }
RT @CodeSnippetsNET: Usefull IsNull extension method for .NET http://t.co/Q6IbI81Kre #code #csharp #dotnet #vb #programming