From 31413d17ef2058a5631e78cad89f14618cedcaa9 Mon Sep 17 00:00:00 2001 From: Alecio Furanze Date: Mon, 6 May 2024 01:55:49 +0200 Subject: [PATCH] fix null type --- src/by/By.Hash.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/by/By.Hash.cs b/src/by/By.Hash.cs index b52e52a..5836894 100644 --- a/src/by/By.Hash.cs +++ b/src/by/By.Hash.cs @@ -10,6 +10,8 @@ public partial class By : IBy { public static Types Hash(T value) { + if (value == null) return Types.Null; + Type type = typeof(T) == typeof(Type) ? (Type)(object)value : value.GetType(); if (type == typeof(sbyte)) return Types.Sbyte;