开发者

Is there an equivalent to C#'s #region directive in AS3?

Just started coding in AS3 with FlashDevelop and coming from a C# background, I would like to know if there's something equivalent to the #region directive in AS3?

The #region directive in C# essentially allows an IDE e.g Visual Studio to collapse or expand a section of code to improve readability. With #region directives, you can split codes in sections e.g constructors, properties, public/private methods to aid others perusing your code.

So the C# code below ...

interface IPurchaseOrder
{
    #region Properties

    bool IsProcessed { get; set; }
    bool ISValidOr开发者_JAVA百科der { get; set; }

    #endregion Properties

    #region Methods

    bool ProcessOrder();

    #endregion Methods
}

becomes

interface IPurchaseOrder
{
    Properties

    Methods
}


With flashdevelop it works like this:

//{ region region name

  ...your code here

//} endregion 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜