The situation: I have the code like the following:
interface IFoo
{
int Bar { set; }
}
class FooImpl : IFoo
{
public int Bar
{
get { return 0; }
set { Console.WriteLine("Oops"); }
}
static void Main ()
{
FooImpl fooImpl = new FooImpl ();
IFoo foo = fooImpl;
foo.Bar = 2;
Console.WriteLine (fooImpl.Bar);
}
}
When I invoke 'Safe Delete' on IFoo.Bar, not only the property declaration gets deleted, but also the 'foo.Bar' statement which is clearly incorrect.