Let's say I do this in a view:
@if (bout.OurScore > bout.OpponentScore)
else if (bout.OurScore < bout.OpponentScore)
This is a perfectly valid contruct, and renders fine in the view. If the bout is a win, write "Win". If the bout is a loss, write "Loss". Otherwise, write "Tie".
However, Code Analysis complains of the following errors on the @:Tie line.
- Cannot resolve method 'Write()', candidates are...
- "@" must be followed by a valid code block
P.S. On an unrelated note... in case you're interested, this forum is completely broken in IE9. Cannot use the text editor buttons or even post a discussion using IE9. Had to switch to FF to even post this.