Programming Tutorials

(追記) (追記ここまで)

Preprocessor directives in C#

By: Ram Baskar in Csharp Tutorials on 2011年02月05日 [フレーム]

C# features "preprocessor directives" (though it does not have an actual preprocessor) based on the C preprocessor that allow programmers to define symbols but not macros. Conditionals such as #if, #endif, and #else are also provided. Directives such as #region give hints to editors for code folding.

public class Foo
{
 #region Procedures
 public void IntBar(int firstParam) {} 
 public void StrBar(string firstParam) {} 
 public void BoolBar(bool firstParam) {} 
 #endregion
 #region Constructors
 public Foo() {}
 public Foo(int firstParam) {}
 #endregion
}



(追記) (追記ここまで)


Add Comment

JavaScript must be enabled for certain features to work
* Required information
1000

Comments

No comments yet. Be the first!
(追記) (追記ここまで)
(追記) (追記ここまで)

AltStyle によって変換されたページ (->オリジナル) /