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 CS3006

Overloaded method 'method' differing only in ref or out is not CLS-compliant

A method cannot be overloaded based on the ref or out parameter and be compliant with the Common Language Subset (CLS).

The following sample generates CS3006:

using System;
[assembly: CLSCompliant(true)]

public class MyClass {
   public void f(int i) {
   }
   public void f(ref int i) {   // CS3006
   }

   public static void Main() {
   }
}

To resolve this error, comment out the assembly-level attribute or remove one of the method definitions.