I'm not sure if this is a ReSharper problem or a VisualStudio error but I'll try here first.
On line 3, I typed an opening curly brace just after the '(true)'. A closing curly brace was automatically placed at the end of the line which incorrectly includes the 'i++' as part of the if statement.
It appears the closing curly brace is always placed at the end of the line regardless of how many statements are on that line.
My apologies if this isn't a ReSharper issue.