class Class
{
int value;
int Value
{
get { return value; }
}
void M()
{
ref int x = ref value;
}
}
applying the code fix results in:
class Class
{
int Value { get; set; }
void M()
{
ref int x = ref Value;
}
}
which doesn't compile because Value doesn't return by ref.
applying the code fix results in:
which doesn't compile because Value doesn't return by ref.