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