Skip to content

Latest commit

 

History

History
38 lines (32 loc) · 855 Bytes

cs0809.md

File metadata and controls

38 lines (32 loc) · 855 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Compiler Warning (level 1) CS0809
Compiler Warning (level 1) CS0809
07/20/2015
CS0809
CS0809
2c2f0248-ab3a-4cdc-a1b0-2f0e05eac4c9

Compiler Warning (level 1) CS0809

Obsolete member 'memberA' overrides non-obsolete member 'memberB'.

Typically, a member that is marked as obsolete should not override a member that is not marked as obsolete. This warning is generated in Visual Studio 2008 but not in Visual Studio 2005.

To correct this error

Remove the Obsolete attribute from the overriding member, or add it to the base class member.

Example

// CS0809.cs
public class Base
{
    public virtual void Test1()
    {
    }
}
public class C : Base
{
    [System.Obsolete()]
    public override void Test1() // CS0809
    {
    }
}