Back to slide -- Keyboard shortcut: 'u'        next -- Keyboard shortcut: 'n'          io/attributes/1/prog.cs - An obsolete class C, and a class D with an obsolete method M.Lecture 10 - slide 36 : 40
Program 1

using System;

[Obsolete("Use class D instead")]
class C{
  // ...
}

class D{
  [Obsolete("Do not call this method.",true)]
  public void M(){
  }
}

class E{
  public static void Main(){
    C c = new C();
    D d = new D();
    d.M();
  }
}