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 CS0071

An explicit interface implementation of an event must use property syntax

When implementing an event that was declared in an interface, you must use property syntax.

The following sample generates CS0071:

public delegate void MyEvent(object sender);

interface ITest {
   event MyEvent Clicked;
}

class Test : ITest {
   event MyEvent ITest.Clicked() {   // CS0071
   }
   
   // try the following code instead
   /*
   event MyEvent ITest.Clicked {
      get { 
         return null; 
      }
      set { 
      }
   }
   */
   
   public static void Main() {
   }
}