I am just curious to know why this is allowed.
int i=0;;
I accidentaly typed that. But the program compiled. I noticed it after many days that I have typed ;;
After that I tried with different symbols like ~, !, : etc etc
Why is that not allowed where as first one is allowed.
Just curious to know.
You have typed an empty statement:
It’s legal for an statement in C# to have no body.
From section 8.3 of the C# Language Specification: