@{ int i = 4; }
@foreach (string s in "1,2,3".Split(',')) {
@:s is equal to @s
@{ i++; }
}
I get "No overload for method 'Write' takes 0 arguments" on the @{ i++; } line of code. Any thoughts? Thanks!
@{ int i = 4; }
@foreach (string s in "1,2,3".Split(',')) {
@:s is equal to @s
@{ i++; }
}
I get "No overload for method 'Write' takes 0 arguments" on the @{ i++; } line of code. Any thoughts? Thanks!
Try this:
@{ int i = 4; }
@foreach (string s in "1,2,3".Split(',')) {
@:s is equal to @s
i++
}
or
@{ int i = 4; }
@foreach (string s in "1,2,3".Split(',')) {
<text>is equal to @s</text>
i++;
}