Similar to #2599, which is for SA1313.
SA1312: Variable '_' should begin with lower-case letter
For example, some test code verifies a mock's property wasn't called:
c#
var _ = mock.DidNotReceive().SomeProperty;
:bulb: You can drop var if you are using C# 7. That will turn the code into a discard syntax instead of declaring a local variable.
Thanks, that works perfectly.
Feel free to close this, but I think it might be nice to have the analyzer know how to fix this where possible.
How aboud this issue?
I met the same problem when I want to ignore a local variable with using declration in c# 8.0.
using var _ = new DisposableObject();
Most helpful comment
How aboud this issue?
I met the same problem when I want to ignore a local variable with using declration in c# 8.0.