Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class BasicAttributeDemo
- {
- [Obsolete]
- public void MyFirstdeprecatedMethod()
- {
- Console.WriteLine("Called MyFirstdeprecatedMethod().");
- }
- [ObsoleteAttribute]
- public void MySecondDeprecatedMethod()
- {
- Console.WriteLine("Called MySecondDeprecatedMethod().");
- }
- [Obsolete("You shouldn't use this method anymore.")]
- public void MyThirdDeprecatedMethod()
- {
- Console.WriteLine("Called MyThirdDeprecatedMethod().");
- }
- // make the program thread safe for COM
- [STAThread]
- static void Main(string[] args)
- {
- BasicAttributeDemo attrDemo = new BasicAttributeDemo();
- attrDemo.MyFirstdeprecatedMethod();
- attrDemo.MySecondDeprecatedMethod();
- attrDemo.MyThirdDeprecatedMethod();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment