Should I supress CA1062: Validate arguments of public methods?

Posted by brickner on Stack Overflow See other posts from Stack Overflow or by brickner
Published on 2010-05-18T11:17:14Z Indexed on 2010/05/18 11:20 UTC
Read the original article Hit count: 451

I've recently upgraded my project to Visual Studio 2010 from Visual Studio 2008.

In Visual Studio 2008, this Code Analysis rule doesn't exist.

Now I'm not sure if I should use this rule or not.

I'm building an open source library so it seems important to keep people safe from doing mistakes. However, if all I'm going to do is throw ArgumentNullException when the parameter is null, it seems like writing useless code since ArgumentNullException will be thrown even if I won't write that code.

Should I remove that rule or fix the violations?

© Stack Overflow or respective owner

Related posts about fxcop

Related posts about code-analysis