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 CS0221

Constant value 'value' cannot be converted to a 'type' (use 'unchecked' syntax to override)

An assignment operation that would result in a data loss was detected by checked, which is on by default. Either correct the assignment or use unchecked to resolve this error.

The following sample generates CS0221:

public class MyClass {
   public static void Main() {
   //   unchecked {
         int a = (int)0xFFFFFFFF;   // CS0221
         a++;
   //   }
   }
}