C# has regions which serve a similar function. To use regions, your code would look a bit like this:
public class Foo {
#region Constants
private const string VIP = "Cob H.";
private const int IMPORTANT_NUMBER = 23;
#endregion
#region API Functions
[WebMethod(MessageName = "SomeInformation")]
public string SomeInformation() {
return VIP + " is dead.";
}
#endregion
#region Inner Classes
private class IrrelevantClass {
public string Name { get; set; }
public string City { get; set; }
}
#endregion
}
If you're using Visual Studio, the C# editor allows you to collapse regions, making it easier to browse large source files.