I just spent hours trying to debug my code. The whole problem boiled down to a line:
a == b;
when I really wanted
a = b;
A classic and foolish problem. The thing is, my eyes just glossed over == every time I checked this section of code.
Is there a way to enable a syntax highlighting (squiggles) on all == outside of conditionals?
That is, I want Visual Studio to warn me when I have an == outside of an if(), while(), for(), ?:, etc. This program was in C++, but I would like the same feature for C# editing.
I’d settle for something that would let me (easily) set error squiggles using regex.
This doesn’t actually answer your question, but the question seems moot given that the compiler should have given a level 1 warning for that: C4553