Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

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;
      }
   }
}
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.