简体   繁体   中英

Visual Studio Doesn't Find All References

When replacing a variable, I often rely on "Find All References" to actually find all references to the variable in question. Missing a reference can mean not doing the full job. Today I used find all references and it didn't work; in particular it did not find the Write reference. Do I lack in understanding of how Find All References works, or is it just a bug? I am using VS Enterprise 2019.

See screenshot. Missing reference is on Line 527: 在此处输入图像描述

If you want to rename a variable, class name, whatever and want to make sure all references are renamed, you can use Refactor/Rename functionality:

  • Select the variable, class name, whatever you want to rename

  • Press ctrl + R , ctrl + R or Edit -> Refactor -> Rename

  • Rename

  • Enjoy

More infos can be found on docs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM