Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you are using Resharper, you can change the Type Members Layout template so that it orders your code however you like. See under Resharper>Options>Languages>C#>Type Members Layout. <a href="http://www.jetbrains.com/resharper/features/screenshots/40/automatic_member_layout_full.png" rel="nofollow noreferrer">alt text http://www.jetbrains.com/resharper/features/screenshots/40/automatic_member_layout_full.png</a></p> <p>You can, for example, put methods with particular attributes first in your file... e.g. methods marked with NUnit's [Setup] and [TearDown] could come before methods marked with [Test] by placing a block like:</p> <pre><code>&lt;!--Fixture Setup/Teardown--&gt; &lt;Entry&gt; &lt;Match&gt; &lt;And&gt; &lt;Kind Is="method"/&gt; &lt;Or&gt; &lt;HasAttribute CLRName="NUnit.Framework.TestFixtureSetUpAttribute" Inherit="true"/&gt; &lt;HasAttribute CLRName="NUnit.Framework.TestFixtureTearDownAttribute" Inherit="true"/&gt; &lt;/Or&gt; &lt;/And&gt; &lt;/Match&gt; &lt;/Entry&gt; </code></pre> <p>before:</p> <pre><code>&lt;!--Test methods--&gt; &lt;Entry&gt; &lt;Match&gt; &lt;And Weight="100"&gt; &lt;Kind Is="method"/&gt; &lt;HasAttribute CLRName="NUnit.Framework.TestAttribute" Inherit="false"/&gt; &lt;/And&gt; &lt;/Match&gt; &lt;Sort&gt; &lt;Name/&gt; &lt;/Sort&gt; &lt;/Entry&gt; </code></pre> <p>and then have a catch-all for everything else:</p> <pre><code>&lt;!--All other members--&gt; &lt;Entry&gt; &lt;Sort&gt; &lt;Name/&gt; &lt;/Sort&gt; &lt;/Entry&gt; </code></pre> <p>The template system is very powerful and should meet your needs.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload