Why I can access to X variable from "method()" and not from Main() method?
class Program
{
int X; // this is the variable I want access
static void Main(string[] args)
{
int a;
a = X; // this doesnt work, but why?
}
void metodo()
{
int b;
b = X; //this works, but why?
}
}