Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我最近注意到 Visual Studio 2022 具有“同步命名空间”这一功能。
如果我点击它,似乎什么也没有发生。此功能的预期目的是什么?
它会更新代码中的命名空间以匹配文件夹结构。
例如,如果您在文件夹Models中有一个文件 Class1.cs ,它会将 Class1.cs 中的代码命名空间更改为Project.Models。