Permalink
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (33 sloc) 1005 Bytes
title ms.date f1_keywords helpviewer_keywords ms.assetid
Compiler Warning (level 2) CS0114
07/20/2015
CS0114
CS0114
9647772b-d581-4620-981e-f9c607d4a1af

Compiler Warning (level 2) CS0114

'function1' hides inherited member 'function2'. To make the current method override that implementation, add the override keyword. Otherwise add the new keyword.

A declaration in a class conflicts with a declaration in a base class such that the base class member will be hidden.

For more information, see base.

The following sample generates CS0114:

// CS0114.cs  
// compile with: /W:2 /warnaserror  
abstract public class clx  
{  
   public abstract void f();  
}  
  
public class cly : clx  
{  
   public void f() // CS0114, hides base class member  
   // try the following line instead  
   // override public void f()  
   {  
   }  
  
   public static void Main()  
   {  
   }  
}