C# Variable

Does anyone know how to declare a variable in c#. I want to do this:
This is java script -
var levelname:String;
Thanks

JavaScript:

var levelName:String;

Would be in C#:

String levelName;

In c#

If you want it to be public:

public string yourString = “…”;

Private:

string yourString = “…”;

Written a blog related to concept of varibles and function the link is attched below:

I am trying to add a variable to hold or show values and i used this and it is not working

public static int X = 0;

I also tried

public int X;