>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
Because your definition does not make it a constant
A constant expression is an expression that can be fully evaluated at compile time
>// Huh! Can't use const here - weird.
>
>Indeed weird - do you see what may be wrong?
>
>Thanks in advance.
Gregory