I've just started with Razor and was looking to modify an existing cshtml file for news items. Funny thing is, the out-of-the-box razor file also fails with the same error when all I do is open and save it (from the uBootstrap package).
When I try to save I get error CS1513: } expected. Below is my code. I've stripped it down to bare bones and cannot pin point the issue.
Yep, that was it. I'm creating a list of events so the variable name made sense. I changed it back to item. Really hard to see the text was a different color in the editor on my monitor.
Also, sounds like a bug fix needing to happen. The validator in the editor should have caught the use of the reserved word. The error thrown had nothing to do with anything.
error CS1513: } expected
I've just started with Razor and was looking to modify an existing cshtml file for news items. Funny thing is, the out-of-the-box razor file also fails with the same error when all I do is open and save it (from the uBootstrap package).
When I try to save I get error CS1513: } expected. Below is my code. I've stripped it down to bare bones and cannot pin point the issue.
Is it not just your choice of variable name - "event"? That's a reserved word in C# so will probably cause an issue.
Yep, that was it. I'm creating a list of events so the variable name made sense. I changed it back to item. Really hard to see the text was a different color in the editor on my monitor.
Also, sounds like a bug fix needing to happen. The validator in the editor should have caught the use of the reserved word. The error thrown had nothing to do with anything.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.