473,414 Members | 1,691 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

.net 2.0 - unused class variables / methods

Hi all,

I'm using Visual Studio 2005 and it has as you are probably aware a very
handy feature of reporting to you which variables are not being used - cool
thanks...

What would be even more handy is a way of finding out which of my methods
are being used, and across a whole project. I've entered the horrible
realms of a project going out of control and I've added bits for testing,
and now I'm having to go through the whole project, commenting stuff out,
rebuilding and seeing if it works - I'm sure there's an easy/quicker way...

Anyone know of any tools that can identify which methods are not being used
in a project?

Any help would be appreciated.

Regards

Rob
Jul 4 '07 #1
4 1400
Right click on the method and "Find all references"
--
Milosz
"Rob Meade" wrote:
Hi all,

I'm using Visual Studio 2005 and it has as you are probably aware a very
handy feature of reporting to you which variables are not being used - cool
thanks...

What would be even more handy is a way of finding out which of my methods
are being used, and across a whole project. I've entered the horrible
realms of a project going out of control and I've added bits for testing,
and now I'm having to go through the whole project, commenting stuff out,
rebuilding and seeing if it works - I'm sure there's an easy/quicker way...

Anyone know of any tools that can identify which methods are not being used
in a project?

Any help would be appreciated.

Regards

Rob
Jul 4 '07 #2
"Milosz Skalecki [MCAD]" wrote ...
Right click on the method and "Find all references"
OMG - LOL! Hi Milosz, thanks for the reply - talk about the answer being
under my own nose...hehe...the amount of times in a day I right click and
choose "goto definition" - lol...never seen that before...

Many thanks - its really useful!

Still be handy to have something that checked the entire project for unused
methods/properties etc....

Rob
Jul 5 '07 #3
Hi Rob,

I'm really glad it helped you. There are some code analysis/review tools.
Most of them are comercial so you'd have to spend some money. Have a look
here:
http://msdn2.microsoft.com/en-us/vcs.../aa336818.aspx

Regards
--
Milosz
"Rob Meade" wrote:
"Milosz Skalecki [MCAD]" wrote ...
Right click on the method and "Find all references"

OMG - LOL! Hi Milosz, thanks for the reply - talk about the answer being
under my own nose...hehe...the amount of times in a day I right click and
choose "goto definition" - lol...never seen that before...

Many thanks - its really useful!

Still be handy to have something that checked the entire project for unused
methods/properties etc....

Rob
Jul 5 '07 #4
"Milosz Skalecki [MCAD]" wrote ...
I'm really glad it helped you. There are some code analysis/review tools.
Most of them are comercial so you'd have to spend some money. Have a look
here:
http://msdn2.microsoft.com/en-us/vcs.../aa336818.aspx
Hi Milosz,

Thanks for the reply and link - I'll check it out.

Your help is appreciated.

Regards

Rob
Jul 6 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Neil Zanella | last post by:
Hello, It seems to me that using too many variables at class scope in C++ (e.g. private data members) can be just as bad as having a C program with lots of global variables. This is especially...
4
by: artooro | last post by:
Hi, I'm using some lines of code like this: ClassName *var = new ClassName(...); and that's it. The class constructor does everything I want (there are methods to do more but I don't need...
7
by: ralphNOSPAM | last post by:
Is there a PHP script that can find unused variables? I'd like to 'clean up' my scripts. Thanks...
12
by: zacks | last post by:
Suddenly, in a VB2005 project I am working on, several variables show up in the list of warnings are being unused local variables. But they all are. Several of them are the ex variable used in a...
2
by: timpera2501 | last post by:
I am a newb to OOP programming and I'm only just starting with C#. I've done a TON of reading lately, and I'm currently in the process of modifying some of the function provided by the...
7
by: WXS | last post by:
Vote for this idea if you like it here: http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=5fee280d-085e-4fe2-af35-254fbbe96ee9...
9
by: ThazKool | last post by:
I am just wondering if all the methods that are never called upon during a programs execution are removed when optimizing. For example you have: class FooA { void a(); ... void z(); }
9
by: Martijn Mulder | last post by:
A nice feature of the csc.exe compiler is that it warns you if a variable is declared but never used. But unused methods are not flagged, even when the warning level is set to 4.
8
by: Frank Rizzo | last post by:
Is there a setting in VS2005 to quickly locate methods that are unused (maybe through compiler warnings)? If not, any utilities out there that do that? Thanks
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.