diff --git a/X10D/Int16Extensions.cs b/X10D/Int16Extensions.cs index 29606c2..43723dc 100644 --- a/X10D/Int16Extensions.cs +++ b/X10D/Int16Extensions.cs @@ -120,7 +120,7 @@ /// Returns if is 0, /// otherwise. public static bool ToBoolean(this short value) => - value != 0; + ((long)value).ToBoolean(); /// /// Gets an boolean value that represents this integer. @@ -129,6 +129,6 @@ /// Returns if is 0, /// otherwise. public static bool ToBoolean(this ushort value) => - value != 0; + ((ulong)value).ToBoolean(); } } diff --git a/X10D/Int32Extensions.cs b/X10D/Int32Extensions.cs index 446b82e..fa98217 100644 --- a/X10D/Int32Extensions.cs +++ b/X10D/Int32Extensions.cs @@ -256,7 +256,7 @@ /// Returns if is 0, /// otherwise. public static bool ToBoolean(this int value) => - value != 0; + ((long)value).ToBoolean(); /// /// Gets an boolean value that represents this integer. @@ -265,6 +265,6 @@ /// Returns if is 0, /// otherwise. public static bool ToBoolean(this uint value) => - value != 0; + ((ulong)value).ToBoolean(); } }