I have a class with two constructors that look like this:
public MyClass(SomeOtherClass source) : this(source, source.Name) { }
public MyClass(SomeOtherClass source, string name) { /* ... */ }
When I run FxCop, it correctly reports a violation of CA1062: ValidateArgumentsOfPublicMethods, because if source is null in the first construc...
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 Ar...
I have a very simple code (simplified from the original code - so I know it's not a very clever code) that when I compile in Visual Studio 2010 with Code Analysis gives me warning CA1062: Validate arguments of public methods.
public class Foo
{
protected static void Bar(out int[] x)
{
x = new int[1];
for (int i =...