参数类型异常 我们在写一个方法的时候,经常会写很多判断传入的参数的值是否为null的程序,我在看castle IOC的源代码的时候看到他的做法就是抛出一个参数类异常,如下: if (list == null) throw new ArgumentNullException("list");