Can someone please explain why i need @ sign in for the foreach loop but not for an if statement? Pic included.

so i thought i had to use @ to denote c# code within stuff but I had an error and it took me forever to figure out why. I took the @ sign off of my if statement that was inside a foreach loop and it worked here is a photo

by alixious via /r/csharp

Leave a Reply