Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Global Properties?
Message
From
18/04/2004 11:06:27
 
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00895917
Message ID:
00895934
Views:
19
Kevin,

One of the things about statics is that you don't have to instantiate the class in order to use them. In your example, you're showing an instantiation of the class. This is because you haven't actually made your property static, only the private member. Try this instead:
namespace ccGlobals
{
	public class ccGlobals
	{

		private static bool _lHighResolution;
		public static bool lHighResolution
		{
			get {return _lHighResolution ;}
			set {_lHighResolution  = value; }
		}
         }
}
Then you should be able to access it without the need to instantiate:
ccGlobals.lHighResolution = true;
~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform