Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ISValidOrder { get; set; }

    #endregion Properties

    #region Methods

    bool ProcessOrder();

    #endregion Methods
}

becomes

interface IPurchaseOrder
{
    Properties

    Methods
}
like image 347
anonymous Avatar asked Apr 11 '10 09:04

anonymous


People also ask

What is the equivalent of class in C?

The closest thing you can get is a struct .

Is there pass in C?

Parameters in C functions There are two ways to pass parameters in C: Pass by Value, Pass by Reference.

Are there templates C?

The main type of templates that can be implemented in C are static templates. Static templates are created at compile time and do not perform runtime checks on sizes, because they shift that responsibility to the compiler.

What is pointer equivalent in Java?

Java doesn't have pointers; Java has references.


1 Answers

With flashdevelop it works like this:

//{ region region name

  ...your code here

//} endregion 
like image 52
Smalcat Avatar answered Nov 15 '22 05:11

Smalcat