c# - 在 AS3 中是否有等效于 C# 的#region 指令?

标签 c# actionscript-3 flashdevelop

刚开始使用 FlashDevelop 在 AS3 中编写代码并且具有 C# 背景,我想知道是否有与 AS3 中的#region 指令等效的东西?

C# 中的#region 指令实质上允许 IDE(例如 Visual Studio)折叠或展开一段代码以提高可读性。使用 #region 指令,您可以将代码分成多个部分,例如构造函数、属性、公共(public)/私有(private)方法,以帮助其他人仔细阅读您的代码。

所以下面的 C# 代码 ...

interface IPurchaseOrder
{
    #region Properties

    bool IsProcessed { get; set; }
    bool ISValidOrder { get; set; }

    #endregion Properties

    #region Methods

    bool ProcessOrder();

    #endregion Methods
}

成为

interface IPurchaseOrder
{
    Properties

    Methods
}

最佳答案

使用 flashdevelop 它的工作原理是这样的:

//{ region region name

  ...your code here

//} endregion 

关于c# - 在 AS3 中是否有等效于 C# 的#region 指令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2616551/

相关文章:

c# - 可能是Visual Studio 2015中的C#编译器错误

flash - 在AS3中,URLLoader.close();如果没有加载任何内容会导致问题吗?

debugging - FlashDevelop 调试器问题

actionscript-3 - FlashDevelop 中单独的调试/发布输出

c# - await 运算符在 ASP.NET 上的行为与在 ASP.NET CORE 上的行为不同吗?

c# - 方法组中泛型调用的 RealProxy Invoke Message 中的 TargetException

c# - 如何在不使用 new 的情况下直接赋值?

actionscript-3 - 在 IntelliJ 中,如何在 Flex 或 actionscript 模块的模块依赖项中创建 swcs 的相对路径?

apache-flex - FlashVars 或外部接口(interface)

actionscript-3 - FlashDevelop - 将项目保存为 XFL 时,测试项目设置 "Open Document"停止工作