In C#, when I have different code sections like constants, API functions, helper functions, etc., I would like to divide them. I normally use something like this:
public class Foo {
//================== Constants ==================
private const string VIP = "Cob H.";
private const int IMPORTANT_NUMBER = 23;
//================== API Functions ==================
[WebMethod(MessageName = "SomeInformation")]
public string SomeInformation() {
return VIP + " is dead.";
}
//================== Inner Classes ==================
private class IrrelevantClass {
public string Name { get; set; }
public string City { get; set; }
}
}
Is there an elegant way to divide them instead of using a bunch of ugly comments? Like in Objective-C you can use
#pragma mark - Inner Classes
I've looked at all the keywords in the pragma list of C#, and none of them looks promising.
#region Constants .... #endregion
?