how to create public variable in c#

C#
public static class Myvariables{

    public static int x = 1;

}
Source

Also in C#: