Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The operator 'operator' requires a matching operator 'missing_operator' to also be defined
A user-defined true operator requires a user-defined false operator, and vice versa. For more information, see Operators (C# Programming Guide).
The following sample generates CS0216:
// CS0216.cs
class MyClass
{
   public static bool operator true (MyClass MyInt)   // CS0216
   {
      return true;
   }
   // to resolve, uncomment the following operator definition
   /*
   public static bool operator false (MyClass MyInt)
   {
      return true;
   }
   */
   public static void Main()
   {
   }
}