Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Error CS0113
Collapse the table of content
Expand the table of content

Compiler Error CS0113

A member 'function' marked as override cannot be marked as new or virtual

It is mutually exclusive to mark a method with the new and override keywords.

The following sample generates CS0113:

// CS0113.cs
namespace x
{
   abstract public class clx
   {
      public abstract void f();
   }

   public class cly : clx
   {
      override new public void f()   // CS0113, remove new keyword
      {
      }

      public static int Main()
      {
         return 0;
      }
   }
}
Show:
© 2015 Microsoft