c# - Extension method which this of type "Type" is null -


i created extension method system.type , unit test method. possible? thanks!

public static bool getfoo(this type self) {      if (self == null)      {           throw new argumentnullexception("this")      }      ... } 

assert ((type)null).getfoo() throws.


Comments