a variable defined static in class definition is class variable.
public MyClass
{
static int a; // class variable
}
a variable declared in a function (Method) is local variable.
public class MyClass
{
static void Main()
{
string name; //local variable
}
}
a variable declared in a class definition, and when class is instantiated and those variables will be member variable
public class MyClass
{
int a; // here they are local variable of class body.
int b;
}
//create instance of class
MyClass mc = new MyClass();
mc.a = 10; //these are member variables
mc.b = 11;