diff --git a/ArrayIsEmpty.cs b/ArrayIsEmpty.cs
index 07d6ec5da..7df593cf6 100644
--- a/ArrayIsEmpty.cs
+++ b/ArrayIsEmpty.cs
@@ -40,7 +40,7 @@ public static partial class ArrayHelpers
/// Checks if an array is null, filled with the NULL byte (0x00) or ASCII whitespace (0x20)
/// Array
/// True if null or whitespace
- 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;
/// Checks if an array is null or filled with the NULL byte (0x00)
/// Array
diff --git a/DateHandlers.cs b/DateHandlers.cs
index 3c7ee083f..9925a16b9 100644
--- a/DateHandlers.cs
+++ b/DateHandlers.cs
@@ -302,8 +302,7 @@ public static class DateHandlers
if(offset == -2047)
return new DateTime(year, month, day, hour, minute, second, DateTimeKind.Unspecified).AddTicks(ticks);
- if(offset < -1440 ||
- offset > 1440)
+ if(offset is < -1440 or > 1440)
offset = 0;
return new DateTimeOffset(year, month, day, hour, minute, second, new TimeSpan(0, offset, 0)).AddTicks(ticks).
diff --git a/Marshal.cs b/Marshal.cs
index bdb31c793..28ba11214 100644
--- a/Marshal.cs
+++ b/Marshal.cs
@@ -439,8 +439,7 @@ public static class Marshal
{
outBuf = null;
- if(hex is null ||
- hex == "")
+ if(hex is null or "")
return -1;
var off = 0;