Snipps by Patrik

.NET Argument Exceptions

A C# method can be called with invalid arguments, this may cause an ArgumentException.

ArgumentException indicates that a method was called with an invalid argument. This can help improve program quality.

...see more

ArgumentException is thrown when a method is invoked and at least one of the passed arguments does not meet the parameter specification of the called method. The ParamName property identifies the invalid argument.

When using the ArgumentNullException constructor, you can pass a string literal indicating the null argument.

Comments

Leave a Comment

All fields are required. Your email address will not be published.