Skip to content

Update guidelines with text that's cut off #210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/Guidelines(8th Edition).xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
<guideline key="Ch23_e606562" severity="DO" section="Coding" subsection="Miscellaneous">DO use delegate types that match the signature of the desired method when an unmanaged API requires a function pointer.</guideline>
<guideline key="Ch14_4241a49" severity="DO NOT" section="Coding" subsection="Miscellaneous">DO NOT pass null as the value of the eventArgs argument.</guideline>
<guideline key="Ch02_b86a9e2" severity="DO" section="Coding" subsection="Miscellaneous">DO rely on System.WriteLine() and System.Environment.NewLine rather than \n to accommodate Windows-specific operating system idiosyncrasies with the same code that runs on Linux and iOS.</guideline>
<guideline key="Ch17_f8785bf" severity="DO NOT" section="Coding" subsection="Miscellaneous">"DO NOT make any unwarranted assumptions about the order in which elements of a collection will be enumerated. If the collection is not documented as enumerating its elements in a particular order, it is not guaranteed to produce elements in any particula"</guideline>
<guideline key="Ch17_f8785bf" severity="DO NOT" section="Coding" subsection="Miscellaneous">"DO NOT make any unwarranted assumptions about the order in which elements of a collection will be enumerated. If the collection is not documented as enumerating its elements in a particular order, it is not guaranteed to produce elements in any particular order."</guideline>
<guideline key="Ch09_b25f010" severity="DO NOT" section="Coding" subsection="Miscellaneous">DO NOT include “sentinel” values (such as a value called Maximum); such values can be confusing to the user.</guideline>
<guideline key="Ch04_9ec5eda" severity="DO NOT" section="Coding" subsection="Miscellaneous">"DO NOT use a constant for any value that can possibly change over time. The value of pi and the number of protons in an atom of gold are constants; the price of gold, the name of your company, and the version number of your program can change."</guideline>
<guideline key="Ch02_bd492fc" severity="DO" section="Coding" subsection="Miscellaneous">"DO use the C# keyword rather than the BCL name when specifying a data type (e.g., string rather than String)."</guideline>
Expand Down Expand Up @@ -183,7 +183,7 @@
<guideline key="Ch05_02450bc" severity="DO" section="Coding" subsection="Parameters">DO provide good defaults for all parameters where possible.</guideline>
<guideline key="Ch06_995dfaa" severity="DO" section="Coding" subsection="Properties">DO use properties for simple access to simple data with simple computations.</guideline>
<guideline key="Ch06_e2d10a1" severity="DO" section="Coding" subsection="Properties">DO favor automatically implemented properties over properties with simple backing fields when no additional logic is required.</guideline>
<guideline key="Ch06_6667185" severity="CONSIDER" section="Coding" subsection="Properties">"CONSIDER using the same casing on a property’s backing field as that used in the property, distinguishing the backing field with an “_” prefix. Do not, however, use two underscores; identifiers beginning with two underscores are reserved for the use of t"</guideline>
<guideline key="Ch06_6667185" severity="CONSIDER" section="Coding" subsection="Properties">"CONSIDER using the same casing on a property’s backing field as that used in the property, distinguishing the backing field with an “_” prefix. Do not, however, use two underscores; identifiers beginning with two underscores are reserved for the use of the language."</guideline>
<guideline key="Ch06_dc89394" severity="DO" section="Coding" subsection="Properties">"DO use nameof(value) (which resolves to “value”) for the paramName argument when creating ArgumentException() or ArgumentNullException() type exceptions (value"" is the implicit name of the parameter on property setters)."""</guideline>
<guideline key="Ch06_2e0ebdb" severity="DO" section="Coding" subsection="Properties">DO favor automatically implemented properties over fields.</guideline>
<guideline key="Ch06_7e076a4" severity="DO" section="Coding" subsection="Properties">DO favor automatically implemented properties over using fully expanded ones if there is no additional implementation logic.</guideline>
Expand Down