Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Code folding
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Collapsing metadata=== Metadata can be lengthy, and is generally less important than the data it is describing. Collapsing metadata allows one to primarily focus on the data, not the metadata. For example, a long list of [[Attribute (computing)|attributes]] in [[C Sharp (programming language)|C#]] may be manually collapsed as follows:<ref>{{Cite web |last=Rob |date=March 19, 2014 |title=Now, this is interesting, because I tend to use #region more to HIDE THE CRAP (XML documentation etc, long list of attributes etc.) making it easier to see the important code⦠|url=http://discourse.codinghorror.com/t/the-problem-with-code-folding/294/31 |url-status=live |archive-url=https://web.archive.org/web/20200806132848/https://discourse.codinghorror.com/t/the-problem-with-code-folding/294/31 |archive-date=Aug 6, 2020 |website=The Problem With Code Folding |publisher=Coding Horror Discussion}}</ref> <syntaxhighlight lang="csharp"> #region Attributes [Browsable(false)] [MergableProperty(false)] [DefaultValue(null)] [PersistenceMode(PersistenceMode.InnerProperty)] [TemplateContainer(typeof(MyType))] [TemplateInstance(TemplateInstance.Single)] #endregion public ITemplate ContentTemplate { get; set; } </syntaxhighlight> The resulting code displays as: <syntaxhighlight lang="csharp"> Attributes public ITemplate ContentTemplate { get; set; } </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)