NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error CS0504

The constant 'variable' cannot be marked static

If a variable is const, it is also static. If you want a const and static variable, just declare that variable as const; if all you want is a static variable, just mark it static.

The following sample generates CS0504:

namespace x 
{
   abstract public class clx 
   {
      static const int i = 0;   // CS0504, cannot be both static and const
      abstract public void f();
   }
}