Is there a (better) way to find all references to a property setter?

前端 未结 2 1841
情书的邮戳
情书的邮戳 2021-01-03 19:23

Visual Studio\'s \"Find All References\" function works nicely for finding references to a property, and as it happens the \"Call Hierarchy\" does this too - it\'s even bet

相关标签:
2条回答
  • 2021-01-03 19:59

    Resharper can do that for you.

    Without R#, one way would be to temporarly set the setter to private and recompile. That will give an error everywhere you're trying to set. Not pretty, but faster than any other method I can think of.

    0 讨论(0)
  • 2021-01-03 20:08

    It is possible in Visual Studio 2019 to sort and filter by "Kind" using the "Find All References" function. The feature was requested on Microsoft's developercommunity forum

    The "references" window with the "Kind" column is displayed to the very right, highlighted by a orange box.

    0 讨论(0)
提交回复
热议问题