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 CS0031

Constant value 'value' cannot be converted to a 'type'

An attempt was made to assign a value to a variable whose type cannot store the value.

The following sample generates CS0031:

namespace x
{
   public class a
   {
      public static void Main()
      {
         byte i = 512;   // CS0031, 512 cannot fit in byte
      }
   }
}