PDA

Click to See Complete Forum and Search --> : [RESOLVED] simple problem


tr333
Jul 11th, 2005, 08:06 PM
creating my first c# project, i can't work out how to declare a variable as public.
public string name;
when i try the above code, it says "Invalid expression term 'public'".

jmcilhinney
Jul 11th, 2005, 08:32 PM
You will get that error if you use scope modifiers within a method. Scope modifiers are only valid at class level.

tr333
Jul 11th, 2005, 08:39 PM
thanks...

should have known that from vb.net.