Seems this question hasn’t been asked. If it duplicates, please give a comment.
That’s said I have the #region comment in C# code.
#region if this comment is very long, can I divide the comment into multi-lines?
// my code is here
#endregion
Is it possible to divide the #region comment into multi-lines like the bottom code ?
#region the comment is separated into
#region-2 two lines.
// my code is here
#endregion
I don’t think long comments were the intended usage for the
#regiondirective. When I think “region” I think things like “Private Members” or “Service Declarations” or “Overloaded Constructors” or a simple label of that nature.If you have a long comment, I would instead include it at the top of the region, like this:
MSDN describes the part that comes after
#regionas a “name”, not a comment. Names should be descriptive enough to identify what’s in the region, nothing more.