Possible Duplicate:
How do I mark a method as Obsolete/Deprecated? – C#
How do you mark a class as deprecated? I do not want to use a class any more in my project, but do not want to delete it before a period of 2 weeks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to use the
[Obsolete]attribute.Example:
The parameters are optional. The first parameter is for providing the reason it’s obsolete, and the last one is to throw an error at compile time instead of a warning.