You need to upgrade Resharper.
private string context;
public string Foo {
get {
if (this.context == null) {
this.context = "foo";
}
return this.context;
}
}
Gets turned into this using R# 8.2:
public string Foo {
get { return this.context ?? (this.context = "foo"); }
}
Which is correct, because assignment in C# returns the assigned value. In fact, I use this pattern all the time for lazy initialization.