New warning CS0809 in C# 3 (Visual Studio 2008)

There were several breaking changes (fixes) in C# 3 from C# 2.  One is the ability to attribute a member override with ObsoleteAttribute without also attributing it the virtual member in the base class. For example, the following will compile without error In C# 2 (Visual Studio 2005/.NET 2.0): using System; internal class BaseClass{    public virtual void Method()    {    }} internal class DerivedClass : BaseClass{    [Obsolete]    public override void Method()    {    }} public static class Progam{    public static void Main()    {        BaseClass baseClass = new DerivedClass();        baseClass.Method();    }} This same code will generate a CS0809 warning with C# 3. This change … Continue reading New warning CS0809 in C# 3 (Visual Studio 2008)