public struct NiceStruct
public float Floating;
public class JustTesting
public void DoSomething(NiceStruct niceStruct)
niceStruct.Floating = 42;
Why isn't ReSharper flagging the fact that setting the struct member Floating to 42 is futile? The value is discarded when the method returns.
(I encountered something like this in a program posted on Code Project. No wonder it didn't work! But it took me a while to find the error, and it would have helped immensely if ReSharper had pointed it out to me.)
In fact, this is such an obvious error I'm surprised that Visual Studio is not flagging it.