时间:2019-03-17 标签:c##region/#endregionmismatch

发布于 2024-11-11 15:36:59 字数 93 浏览 7 评论 0原文

有人知道一个好方法来找出我的代码中哪里有额外的 #region 或 #endregion 吗?我有大约 5000 行 C# 代码,我现在正在尝试手动完成。任何帮助表示赞赏。

Anyone know a good way to find out where i have an extra #region or #endregion in my code? I have about 5000 lines of c# code and i'm trying to do it manually right now. Any help is appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

小ぇ时光︴ 2024-11-18 15:36:59

执行 CTRL+M CTRL+L - 关闭所有区域。然后在左侧一次展开它们(小 + 符号),直到看到没有匹配的 #endregion#region XXX

应该看起来像这样:

“不匹配”

Do CTRL+M CTRL+L - to close up all the regions. Then expand them one at a time on the left (little + sign) until you see #region XXX that doesnt have matching #endregion

Should look like this:

Mismatch

谈情不如逗狗 2024-11-18 15:36:59

单击 Ctrl+M, M 将会折叠所有正确匹配的区域。不匹配的不会被折叠,因此您可以修复它。

Click Ctrl+M, M it will collapse all properly matching regions. The one that doesn't match will not be collapsed so you can fix it.

通知家属抬走 2024-11-18 15:36:59

当您使用快捷方式折叠全部时会发生什么?

CTRL+M CTRL+O - 非递归地折叠所有区域

它应该折叠除具有不匹配。

What happens when you use the shortcuts to collapse all?

CTRL+M CTRL+O - Collapse all regions not recursively

It should collapse all but the region that has the mismatch.

屋顶上的小猫咪 2024-11-18 15:36:59

我自己就遇到了这个问题,

对我来说找出删除结束区域的最简单方法是与源代码管理中的最后一个文件进行比较。

然后该行就会突出显示并且很容易找到。

Just had this issue myself,

easiest way for me to find out where I had deleted an endregion was to do a compare with the last file in source control.

the line was then highlighted and easy to find.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文