B
Blah
In MSDN documentation it states..
Remarks
The constant declaration can declare multiple constants,
for example:
public const double x = 1.0, y = 2.0, z = 3.0;
The static modifier is not allowed in a constant
declaration.
A constant can participate in a constant expression, for
example:
public const int c1 = 5.0;
public const int c2 = c1 + 100;
Yet in VS.NET 2003 the compiler generates a static
modifier yet in MSDN it says its not allowed. If i dont
declare it static the object viewer says its static, and i
am also permitted to specify it as a static const. So,
MSDN wrong? or just typical developer badly explaining it?
Remarks
The constant declaration can declare multiple constants,
for example:
public const double x = 1.0, y = 2.0, z = 3.0;
The static modifier is not allowed in a constant
declaration.
A constant can participate in a constant expression, for
example:
public const int c1 = 5.0;
public const int c2 = c1 + 100;
Yet in VS.NET 2003 the compiler generates a static
modifier yet in MSDN it says its not allowed. If i dont
declare it static the object viewer says its static, and i
am also permitted to specify it as a static const. So,
MSDN wrong? or just typical developer badly explaining it?