How to mark method as deprecated?

In computer software standards and documentation, the term deprecation is applied to software features that are superseded and should be avoided. Although deprecated features remain in the current version, their use may raise warning messages recommending alternate practices, and deprecation may indicate that the feature will be removed in the future. Features are deprecated—rather than being removed—in order to provide backward compatibility and give programmers using the feature time to bring their code into compliance with the new standard. You can mark your own methods as deprecated:

    [Obsolete("Use New Version with Textonly email version")]

    public DataTable GetReminderEmailsForToday() 

    { 

      .... 

    }


Monday, May 12, 2008 | Comments (6) | Add Comment

Comments

Gravatar

Re:How to mark method as deprecated?

Very helpful. Thanks.

8/19/2008 6:13:33 AM | by Jim
Gravatar

Re:How to mark method as deprecated?

Thanks!

9/25/2008 12:58:12 PM | by Carlos
Gravatar

Re:How to mark method as deprecated?

thanks ,,its help a lot since im developing sdks

2/17/2009 5:20:36 AM | by Mudi_mora
Gravatar

Re:How to mark method as deprecated?

If I mark an abstract method as deprecated, do I have to do this for all the places I override it ?

8/20/2009 1:28:49 AM | by dvd
Gravatar

Yes, otherwise it will give you a warning only at place where you are overriding it.

Gravatar

Re:How to mark method as deprecated?

Thanks !

3/22/2010 5:28:14 AM | by haxpor
Gravatar

Re:How to mark method as deprecated?

thanks

6/2/2010 4:33:06 AM | by sumit

New Comment

Your Name:
Email (for internal use only):
Subject:
Comment:
 
Code above:

Categories

Recent Tweets

Valid XHTML 1.0 Transitional