@foreach (string s in \"1,2,3\".Split(\',\')) {
s is equal to @s
}
I want to spit out: s is equal to 1 s is equal to 2 s is equal to 3
@foreach (string s in "1,2,3".Split(',')) {
s is equal to @s
}
I think it is because you are parsing text outside of brackets so Razor is thinking it is code, try using the razor text tag above, this parses exactly the same as @: but (for me at least) is a bit more intuitive (it won't parse the tags)