I am trying to find all the unused methods of my project. I have search ways of doing this, but the most convincing answer I found was to declare all my functions as obsolete, and remove this attribute until I got no warnings.
The problem is that I don't know how to declare a function as obsolete. When I write:
[Obsolete]
class Vector3{
};
VS2005 tells me that Obsolete does not exist. Any suggestions?
In gcc you use __attribute__ ((deprecated))
to tag functions as deprecated.
It looks like __declspec(deprecated)
may do the trick in VS. You'll also have to enable warning level 1 for it to result in a diagnostic.
See http://msdn.microsoft.com/en-us/library/044swk7y%28VS.80%29.aspx
I don't know the rest of your source code, but you should have a
using System;
at the top.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With