creating my first c# project, i can't work out how to declare a variable as public.
when i try the above code, it says "Invalid expression term 'public'".Code:public string name;
Printable View
creating my first c# project, i can't work out how to declare a variable as public.
when i try the above code, it says "Invalid expression term 'public'".Code:public string name;
You will get that error if you use scope modifiers within a method. Scope modifiers are only valid at class level.
thanks...
should have known that from vb.net.