We have the following cycle in the code:
foreach (var event in events)
{
...
{
Of cources we can't name variable "event" as it is a keyword. Which way is a more appropriate in this kind of cases: to use @ prefix (@event) or to use another name like "currentEvent"?
Definitely use another name.
The keyword variables are really cool feature of C# but they should be used for interoperability.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With