Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Global Properties?
Message
De
18/04/2004 11:06:27
 
 
À
18/04/2004 08:30:49
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00895917
Message ID:
00895934
Vues:
18
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform