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 CS0075

To cast a negative value, you must enclose the value in parentheses

Values that you want to cast must be in parentheses.

The following sample generates CS0075:

using System;
enum Myint : long {
   three = 3L,
}

class test {
public static void Main(String [] args ) {
   Myint i = (Myint) -1 ;   // CS0075
   // try the following line instead
   // Myint i = (Myint) (-1) ;
   i++;
   }
}

See Also

() Operator