Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Compiler Error CS0115

'function' : no suitable method found to override

A method was marked as an override, but the compiler found no method to override.

The following sample generates CS0115:

// CS0115.cs
namespace x
{
   abstract public class clu
   {
      public abstract int f();
   }

   abstract public class clx
   {
      public override int f()   // CS0115
      {
         return 0;
      }

      public static void Main()
      {
      }
   }
}

You can resolve CS0115 in one of two ways:

  • Remove the override keyword from the method in class clx.
  • Use clu as a base class for clx.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft