如何删除"#region"在C#中 [英] how can remove "#region" in c#

查看:295
本文介绍了如何删除"#region"在C#中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
如何在此编中删除"#region"? &当我删除它时,用什么代替区域?
请帮助我.

Hi guys,
how can I remove "#region" in this prog? & when I remove this,what''s replace instead of region?
please HELP ME.

推荐答案

删除这两个行并在您的程序中进行构建

#region名称
#endregion


#region [
remove both this lines and build in your program

#region name
#endregion


#region[^]


#region是代码构造,可帮助您编写更清晰易读的代码.
我的建议是不要删除它,而要尝试在您的代码中更多地使用它们.

#region #endregion指令没有直接替代.
#region are code constructs that help you write cleaner more readable code.
My recommendation would be to NOT remove this and infact try and use them more in your code.

There is no direct substitute for the #region #endregion directive.


为什么不简单地看一下语言引用?
您应该理解,#region指令根本不影响代码;它不会影响代码.它主要用于代码编辑器中的文本概述.唯一的语法要求是适当地平衡#region和#endregion.

—SA
Why not simply look at language reference?
You should understand that #region directive does not effect code at all; it''s uses mostly for text outlining in code editor. The only syntactic requirement is proper balancing #region and #endregion.

—SA


这篇关于如何删除"#region"在C#中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆