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 CS0552

'conversion routine' : user defined conversion to/from interface

You cannot create a user-defined conversion to or from an interface. If you need the conversion routine, resolve this error by making the interface a class or derive a class from the interface.

The following sample generates CS0552:

namespace x
{
   interface ii
   {
   }
   public class a
   {
      // delete the routine to resolve CS0552
      public static implicit operator ii(a aa) // CS0552
      {
         return new ii();
      }
      public static void Main()
      {
      }
   }
}