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.
我想重命名 xaml 和 cs 文件,所以我选择了这个文件(在解决方案资源管理器中)然后按 F2 并输入新名称。当我运行它时,它在这条线上出现错误 system.Diagnostics.Debugger.Break(); 为什么我会出错?
那不是错误。
正如其名称清楚地表明,该方法在调用时会暂停调试器。
您还需要打开 cs 文件并更改 cs 文件上的公共类名称。另外,请自行更改设计视图上的 x:Class= namespace.yourpagename。