C# variable types include byte, sbyte, short, ushort, int, uint, long, ulong, float, double, decimal, char, string, enum and reference. Variable name should be consisted with letter, number and slashes only, with a letter at the beginning position.
int i=3; int i^r=3; //error, ^ is not allowed
string ref="this is wrong"; //error, ref is a reserved keyword
using System.Windows.Forms; class tt { public static string str = "test variable"; public int i = 3; public void tweet() { ...... } } MessageBox.Show(tt.str); //test variable
using System.Windows.Forms; class tt { public static string str = "test variable"; public int i = 3; public void tweet() { ...... } } MessageBox.Show(tt.i); //error tt s = new tt(); MessageBox.Show(s.i.ToString()); //3