Hi
In this code, i can't reach public field m from the Main method. Why? It's public.
My other question is: why is this not allowed inside the Main method: public int n instead of just int n?
My last question is: why is this not allowed (without static): public void hello()?
Thanks
class Program
{
public int m;
static void Main(string[] args)
{
int n;
public int n; // no allowed
m = 5;//can't reach m
hello();
}
public static void hello()
{
Console.WriteLine("Hello, dit is mijn eerste method!");
}
}