From 961c1308fd371d795d21104c6352c76463fdc9df Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Fri, 12 Feb 2021 14:23:48 -0800 Subject: [PATCH 1/2] Add in field naming convention updates Add in field naming convention updates to match ReadMe Design Guidelines for clarity. --- docs/Guidelines(8th Edition).xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/Guidelines(8th Edition).xml b/docs/Guidelines(8th Edition).xml index 0dde6cb6..45b60ee7 100644 --- a/docs/Guidelines(8th Edition).xml +++ b/docs/Guidelines(8th Edition).xml @@ -64,6 +64,7 @@ "DO name properties using a noun, noun phrase, or adjective." CONSIDER giving a property the same name as its type. AVOID naming fields with camelCase. + Name fields with PascalCase and a leading underscore. "DO favor prefixing Boolean properties with “Is,” “Can,” or “Has,” when that practice adds value." DO declare all instance fields as private (and expose them via a property). DO name properties with PascalCase. @@ -92,7 +93,7 @@ DO use public static readonly modified fields for predefined object instances prior to C# 6.0. AVOID changing a public readonly modified field in pre-C# 6.0 to a read-only automatically implemented property in C# 6.0 (or later) if version API compatibility is required. AVOID publicly exposed nested types. The only exception is if the declaration of such a type is unlikely or pertains to an advanced customization scenario. - DO use PascalCasing and an “I” prefix for interface names. + DO use PascalCasing and a leading underscore and an “I” prefix for interface names. DO NOT add abstract members to an interface that has already been published. CONSIDER using extension methods or an additional interface in place of default interface members when adding methods to a published interface. DO use extension methods when the interface providing the polymorphic behavior is not under your control. @@ -247,4 +248,4 @@ DO extend SafeHandle or implement IDisposable and create a finalizer to ensure that unmanaged resources can be cleaned up effectively. DO use delegate types that match the signature of the desired method when an unmanaged API requires a function pointer. DO use ref parameters rather than pointer types when possible. - \ No newline at end of file + From 102be5960166a0c70373ecdf9f3c43248e54c4ef Mon Sep 17 00:00:00 2001 From: Kevin B Date: Wed, 17 Feb 2021 14:17:11 -0800 Subject: [PATCH 2/2] Update docs/Guidelines(8th Edition).xml --- docs/Guidelines(8th Edition).xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Guidelines(8th Edition).xml b/docs/Guidelines(8th Edition).xml index 45b60ee7..0fc2864c 100644 --- a/docs/Guidelines(8th Edition).xml +++ b/docs/Guidelines(8th Edition).xml @@ -64,7 +64,7 @@ "DO name properties using a noun, noun phrase, or adjective." CONSIDER giving a property the same name as its type. AVOID naming fields with camelCase. - Name fields with PascalCase and a leading underscore. + Name fields with PascalCase and a leading underscore. "DO favor prefixing Boolean properties with “Is,” “Can,” or “Has,” when that practice adds value." DO declare all instance fields as private (and expose them via a property). DO name properties with PascalCase.