How to fix “Declaration expected”, “Syntax error”, and “Statement cannot appear outside of a method” errors that appear in a non-sense way in Visual Studio