Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Public constant
Message
De
18/03/2013 13:26:49
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01568710
Message ID:
01568723
Vues:
43
Is the class static?

>Hi everybody,
>
>I've defined this constant in the class declaration
>
>
>public const String EncodingXMLString
>
>
>but I can not access it by ClassName.ConstName
>
>I can change it to be a readonly static property instead, but why I can not use it as a constant? I see a comment by another colleague on another readonly property
>
>// Huh! Can't use const here - weird.
>
>Indeed weird - do you see what may be wrong?
>
>Thanks in advance.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform