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 CS1535

Overloaded unary operator 'operator' only takes one parameter

The definition of a unary overloadable operator must take one parameter.

The following sample generates CS1535:

class MyClass {
   // uncomment the method parameter to resolve this CS1535
   public static MyClass operator ++ (/*MyClass MC1*/) {   // CS1535
      return new MyClass();
   }
   public static int Main() {
      return 1;
   }
}