Mark as deprecated

I am trying to find all the unused methods of my project. I have ways to do this, but the most convincing answer I have found is to declare all my functions obsolete and remove this attribute until I get any warnings.

The problem is that I do not know how to declare a function obsolete. When I write:

   [Obsolete]
   class Vector3{

   };

VS2005 tells me that Obsolete does not exist. Any suggestions?

+5
source share
2 answers

In gcc, you use __attribute__ ((deprecated))to tag functions as deprecated.

It looks like it __declspec(deprecated)can do the trick in VS. You also need to enable warning level 1 so that it will give a diagnosis.

. http://msdn.microsoft.com/en-us/library/044swk7y%28VS.80%29.aspx

+8

,

using System;

.

+2

All Articles