剛剛開始在AS3中使用FlashDevelop進行編碼並且來自C#背景,我想知道在AS3中是否有與#region指令等價的東西?在AS3中是否有等價於C#的#region指令?
C#中的#region指令本質上允許IDE(例如Visual Studio)摺疊或展開一段代碼以提高可讀性。使用#region指令,您可以在代碼段中分割代碼,例如構造函數,屬性,公共/私有方法,以幫助其他人閱讀代碼。
低於所以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
}
也許你能解釋的了的#region指令非C#人員。 – 2010-04-11 09:22:39
@Michael Aaron Safyan,謝謝你的高層,已經做了相應的編輯。 – anonymous 2010-04-11 09:47:30
這不是C#的指令,它是Visual Studio的特殊標記。對於c#本身它是一個正則的評論 – zerkms 2010-04-11 10:40:01