C# incorrect variable syntax

C# is a strict strongly typed language
variables are supposed to be written in the following format

Public String my_string = “my string”;
However the game only accepts this
String my_string = “my string”;
Note that I may have got the capitalization wrong in my example, but the point is the word public/static/private is supposed to be a requirement.

Why is this?

I think CodinGame didn’t make own C# compiler, so, probably, this is problem in source code.
Can you paste exactly line of code with error (with actual capitalization)?

Heuu no,

Accessor (publc/protected/private/internal) have to be declare when you create a class variable/property/method.
If you’re in a method scope then you should not declare un accessor (there is no meaning of doing it) because it’s a mistake.

Be aware that it’s not even mandatory to declare the accessor of the variable/property/method as the compiler will take a default value.


public myClass
public string myString;

public string myMethod(){
string myOtherString;