CA2241 problem

The following line of code raises a CA2241:

string.Format("Position:{{{0}, {1}}}", x, y);

A call to String.Format(String, Object, Object) :String in Position.ToString():String does not appear to provide a format specifier for argument 'stack1'. The complete format string provided is 'Position:{{{0}, {1}}}'."



Answer this question

CA2241 problem

  • LoganLuoWei

    I can reproduce this on FxCop 1.35.

    Currently in our current builds, this rule has actually been disabled until we replace our data flow analysis. I will add this to one of the test cases to take into account when we recover this rule.

    Regards

    David



  • CA2241 problem