Note that there are some explanatory texts on larger screens.

plurals
  1. POJuval Lowy's C# Coding Standards Questions
    primarykey
    data
    text
    <p>I enjoy and highly recommend <a href="http://www.idesign.net" rel="nofollow noreferrer">Juval Lowy's</a> - <a href="http://www.idesign.net/Downloads/GetDownload/1985" rel="nofollow noreferrer">C# Coding Standard</a>. Juval explicitly avoids rationale for each directive in order to keep the standard tight (see the preface). However, there are a few directives for which I find myself curious as to the rationale. </p> <p><strong>What is the specific rationale to the following directives from Lowy's C# standard?</strong><br> Hopefully there are hard (non-subjective) answers to these. </p> <p><strong><em>1.13 Avoid fully qualified type names. Use the "using" statement instead.</em></strong><br> Is this a performance issue? Sometimes I only need one instance of the fully qualified name and adding a <em>using</em> seems heavy.</p> <p><strong><em>1.26 Use empty parenthesis on parameterless-anonymous methods. Omit the parenthesis only if the anonymous method could have been used on any delegate.</em></strong><br> Actually I am just confused by the second sentence. Explanation with example(s) would help, thank you.</p> <p><strong><em>2.19 Avoid defining custom exception classes</em></strong><br> What are the considerations in minimizing their numbers? (He next gives guidelines if you do define them (in 2.20).)</p> <p><strong><em>2.29 Avoid using the ternary conditional operator</em></strong><br> Too hard for the reader to digest, or other considerations?</p> <p><strong><em>2.31 Avoid function calls in Boolean conditional statements. Assign into local variables and check on them.</em></strong><br> I don't think I do this, but I am curious...why not?</p> <p><strong><em>2.47 Avoid interfaces with one member.</em></strong><br> Because it is always/usually more prefereable to do what? One method interfaces work when?</p> <p><strong><em>2.53 Prefer using explicit interface implementation</em></strong><br> Why? Also, <a href="https://stackoverflow.com/questions/408415/why-explicit-interface-implementation">Jon Skeet disagrees here</a>.</p> <p>Thanks in advance! Robert</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

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