Default formatting options are unusual - recommend change
When formatting: CTRLALTF with a nested enum inside the class, the enum is surrounded with a #Region. This is hokey, and I think this should not be the default option.
I changed my "Type Members Layout" xml sheet to remove the grouping for enums, but I think the default option should not include #Region(s).
Best regards,
Jeffrey Palermo, C# MVP
Please sign in to leave a comment.
In fact, I've found Regions to wrap interface implementations as well. Who uses regions? For me, they just hinder readability.
My opinion is that I never want Resharper to insert #Region(s) into my code.
Thanks.
Jeffrey Palermo, C# MVP
"Jeffrey Palermo" <no_reply@jetbrains.com> wrote in message
news:24866534.1182290114286.JavaMail.itn@is.intellij.net...
I use regions. They're useful if you collapse code. They also help with the
File Structure Window.
--
John Saunders
Hello,
This is about surrounding the nested classes and other class-like things
(“nested types”), which generally has a sense. Even for enums that have more
than a couple constants with their XmlDocs.
—
Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”
I'm not a big fan of regions, but especially dislike when they are used to wrap a single item that the IDE editor can already collapse. Regions start to make more sense for multiple items but even then I would like to see configuration options that allow people to control exactly when and how regions get created, with explicit detail paid to scenarios involving single items.
Hello Jeremy,
Exactly, there is very flexible pattern-matching system in place, so you
can sort and group items as you like. Check Type Member Layout settings in
Options | Languages | C#
Also, until you are ready to organize your types, you can entirely skip this
brilliant feature and do not put the check on the reformat dialog for the
"Reorder type members". ;)
Sincerely,
Ilya Ryzhenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
JG> I'm not a big fan of regions, but especially when they are used to
JG> wrap a single item that the IDE editor can already collapse. Regions
JG> start to make more sense for multiple items but even then I would
JG> like to see configuration options that allow people to control
JG> exactly when and how regions get created, with explicit detail paid
JG> to scenarios with single items.
JG>