TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sachin dimbre
NA
15
18.8k
Finding un-used constants in MS Visual Studio
Jan 2 2014 2:35 AM
I have some constants file like as following.
namespace ConstantsFile
{
public class myCostants
{
public static WebDocument CONSTANT1 = "constant1";
public static WebDocument CONSTANT2 = "constant2";
public static WebDocument CONSTANT3 = "constant3";
public static WebDocument CONSTANT4 = "constant4";
public static WebDocument CONSTANT5 = "constant5";
}
}
And I am using these constants in my entire project something like this "myCostants.CONSTANT1" and "myCostants.CONSTANT2" and so on.
But this ConstantsFile.myCostants is a huge file containing too many constants and many of them are un-used for ex. it coule be the case that I am no where using "myCostants.CONSTANT3" and still CONSTANT3 is there
in myCostants class.
So My quesion is "Is there any way in MS visual studio to find out such unused constants in one go(and not one by one. I know that right click on constant and click Find All References will give me where all this used or not used at all)".
If there is no way to find out in MS Visual studio, can we write any small utility to find out un-used occurrences.
Thanks and Regards
Sachin
Reply
Answers (
1
)
How to read .mas file fast ? all about .mas file
How to add row dynamically to a table on click of a button ?