I am working with a large code base (mix of C# and VB.Net projects). The code analysis tool can search for "Value Assigned is not used" but it also identifies false positives like
int i = 0; or Dim i as Integer = 0
I am looking for cases where
MyClass myClass = new MyClass();
myClass = someFunction() // that returns a new instance
I searched for As New in VB.Net code and can see that the code editor correctly flags when the initialization value is unused.
How do I use the built in code analysis feature bypassing the false positives?