<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="https://stackoverflow.com/questions/1759352/how-do-i-mark-a-method-as-obsolete-deprecated-c-sharp">How do I mark a method as Obsolete/Deprecated? - C#</a>  </p>
</blockquote>



<p>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.</p>

You need to use the
```
[Obsolete]
```
attribute.
Example:
```
```
[Obsolete("Not used any more", true)]
public class MyDeprecatedClass
{
    //...
}
```
```
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.