I have the following extension method:
public static void ThrowIfArgumentIsNull(this T value, string argument) where T : class { if (value
I like Enforce from the Lokad Shared Libraries.
Basic syntax:
Enforce.Arguments(() => controller, () => viewManager,() => workspace);
This will throw an exception with the parameter name and type if any of the arguments is null.