Tuesday, July 28, 2009

How do I access non-static variable which is declared globally in the static context using C#?

I want to use globally declared non - static variable in the static context "static void main(String[ ] args )" using C#.

How do I access non-static variable which is declared globally in the static context using C#?
You...cannot. Either declare it as a static variable, or create an instance of the object it is in.


No comments:

Post a Comment