Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
81 views
in Technique[技术] by (71.8m points)

c# - How do I find all places that SET a property?

It is easy to find all code that uses a property, however how do I find the code that just sets it?

(When I do a “find all reference” on the “set”, it just does a “find all reference” on the property itself, including code that just reads it.)

question from:https://stackoverflow.com/questions/6096181/how-do-i-find-all-places-that-set-a-property

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can use Resharper.

Alternately, set the setter to private (Or comment out the setter completely) and recompile. You will get errors where you're trying to set the property.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...