kumara
kumara

Reputation: 9

Search used and not used properties

I have a project , there is several classes. I want to search used and not used properties in project.

is visual studio have any way to search ueed properties. Programing language is C#.net

Upvotes: 1

Views: 164

Answers (5)

George Polevoy
George Polevoy

Reputation: 7681

Even if code analysis tools might help in searching this properties, you can't rely on code analysis tools completely, because a client code might access a property with reflection.

This includes data contracts your client proxies might have in case of WCF, javasript json serialization dependencies and the like.

You can try comment out properties suspected to have no usages, but you have not only to make sure it compiles, but also have all the the tests to pass.

Hope you have a decent test coverage and intergated test suites in place.

Upvotes: 0

biju
biju

Reputation: 18040

I suppose you have to use some third party tools available in the market.Just Google it and you will find many.I recommend resharper which gives you many added functionality

Upvotes: 2

Ignacio Soler Garcia
Ignacio Soler Garcia

Reputation: 21855

Just use the "Run Code Analysis" option. It will show the unused calls (if they are not public and available to everyone.

Upvotes: 1

Piotr Justyna
Piotr Justyna

Reputation: 4996

Find all references.

Upvotes: 1

Cheng Chen
Cheng Chen

Reputation: 43531

ReSharper

Upvotes: 5

Related Questions