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 CS0229

Ambiguity between 'member1' and 'member2'

Members of different interfaces have the same name. If you want to keep the same names, you must qualify the names.

The following sample generates CS0229:

interface IList {
   int Count { 
      get; 
      set; 
   }
}

interface ICounter {
   void Count(int i);
}

interface IListCounter : IList , ICounter{
}

class main {
   void Test(IListCounter x) {
      x.Count = 1;  // CS0229
      x.Count(1);   // CS0229
      // try the following lines instead
      // ((IList)x).Count = 1;
      // ((ICounter)x).Count(1);
   }

   public static void Main() {
   }
}