Troubleshooting Exceptions: System.ArgumentNullException
An ArgumentNullException exception is thrown when a null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument.
ArgumentNullException behaves identically to ArgumentException. It is provided so application code can differentiate between exceptions caused by null arguments and exceptions caused by arguments that are not null. For errors caused by arguments that are not null, see Troubleshooting Exceptions: System.ArgumentOutOfRangeException.