Use merge pattern.

This commit is contained in:
2022-03-16 11:47:00 +00:00
parent 1502ea91c1
commit 0462eaac5e
3 changed files with 3 additions and 5 deletions

View File

@@ -40,7 +40,7 @@ public static partial class ArrayHelpers
/// <summary>Checks if an array is null, filled with the NULL byte (0x00) or ASCII whitespace (0x20)</summary>
/// <param name="array">Array</param>
/// <returns>True if null or whitespace</returns>
public static bool ArrayIsNullOrWhiteSpace(byte[] array) => array?.All(b => b == 0x00 || b == 0x20) != false;
public static bool ArrayIsNullOrWhiteSpace(byte[] array) => array?.All(b => b is 0x00 or 0x20) != false;
/// <summary>Checks if an array is null or filled with the NULL byte (0x00)</summary>
/// <param name="array">Array</param>