"ping pong" warning in 1225

If I have a class with some constructors, but none of which create a certain struct,
but I have a method with uses that struct.





using System;

using System.Drawing;

using System.Windows.Forms;

mamespace stuff
{


 


class Foo
{

 




Point _lineEndPoint = new Point();         //it does not like this

int _thing;


 






///<summary>

///Constructor
///</summary>

 


public Foo(): this(10)
{
}






///<summary>

///Constructor
///</summary>
///<param name="thing">the thing</param>

 
public Foo(int thing)
{

      _thing=thing;

}




public void SetMyPoint(int x, int y)
{



     _lineEndPoint.X=x;                   
     _lineEndPoint.Y=y;

}


Then I get a complaint from resharper that:

The new Point is "not needed".




If I apply that quickfix, resharper then complains instead (on the same line) that "_lineEndPoint " is never assigned.

So: unless I disable rules, I cannot get a clean file.



This is a reason why I am failing your "release candidate" test of today's build.

Please sign in to leave a comment.