Reputation: 9
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
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
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
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