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 CS0150

A constant value is expected

A variable was found where a constant was expected.

The following sample generates CS0150:

namespace x
{
   public class a
   {
      public static void Main()
      {
         int i = 0;
         int j = 0;
         switch(i)
         {
            case j:   // CS0150 j is a variable int, not a constant int
            // try something similar to the following line
            // case 1:
         }
      }
   }
}