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 CS3002

Return type of 'method' is not CLS-compliant

A public or protected method cannot return a value whose type is not compliant with the Common Language Subset (CLS).

The following sample generates CS3002:

[assembly:System.CLSCompliant(true)]
public class a {
   public ushort bad() {   // CS3002, public method
      ushort a;
      a = ushort.MaxValue;
      return a;
   }
   private ushort OK() {   // OK, private method
      ushort a;
      a = ushort.MaxValue;
      return a;
   }
   public static void Main() {
   }
}