From 6bedc816032136023dbe86fb72a0fc4fe4ea1d5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87a=C4=9Fda=C5=9F=20Karademir?= Date: Mon, 23 Sep 2019 01:44:51 +0300 Subject: [PATCH 1/2] Update C# Coding Standards and Naming Conventions.md --- C# Coding Standards and Naming Conventions.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/C# Coding Standards and Naming Conventions.md b/C# Coding Standards and Naming Conventions.md index 8688f5b..4af11b6 100644 --- a/C# Coding Standards and Naming Conventions.md +++ b/C# Coding Standards and Naming Conventions.md @@ -412,6 +412,15 @@ public class BarcodeReadException : System.Exception } ``` +#### 26. Do use suffix Any, Is, Have or similar keywords for boolean identifier : + +```csharp +// Correct +public static bool IsNullOrEmpty(string value) { + return (value == null || value.Length == 0); +} +``` + ***Why: consistent with the Microsoft's .NET Framework and easy to read.*** ## Offical Reference From 6f3ea372ffb9aed0ade96fe469fa165b8c0ed325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87a=C4=9Fda=C5=9F=20Karademir?= Date: Mon, 23 Sep 2019 01:56:48 +0300 Subject: [PATCH 2/2] Update C# Coding Standards and Naming Conventions.md --- C# Coding Standards and Naming Conventions.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C# Coding Standards and Naming Conventions.md b/C# Coding Standards and Naming Conventions.md index 4af11b6..61afea7 100644 --- a/C# Coding Standards and Naming Conventions.md +++ b/C# Coding Standards and Naming Conventions.md @@ -412,6 +412,8 @@ public class BarcodeReadException : System.Exception } ``` +***Why: consistent with the Microsoft's .NET Framework and easy to read.*** + #### 26. Do use suffix Any, Is, Have or similar keywords for boolean identifier : ```csharp