Why is the C# compiler lying to me?
Tuesday, 29 March 2011
Today I spent over half an hour trying to figure out why the C# compiler was convinced I had a syntax error while I was convinced I didn't. Of course the compiler was right, but it lied a little, sort of...
Check out this code. Looks fine right? Apparently not.
Checked all my braces matched up, even commented out large chunks of the code until I finally noticed this when I scrolled right a little:
Doh! Lesson: next time the compiler is talking nonsense... scroll right.
(and by the way I deliberately removed the random salting of the password hash before taking the screen shots).
Leave a comment