From 3b0c304f5405e970ea1d2739af30ee762af779e3 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Sat, 16 Nov 2019 11:09:04 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Call=20Array.Empty()=20in=20S?= =?UTF-8?q?tream.GetHash()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- X10D/StreamExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/X10D/StreamExtensions.cs b/X10D/StreamExtensions.cs index 5576aca..13ca2a9 100644 --- a/X10D/StreamExtensions.cs +++ b/X10D/StreamExtensions.cs @@ -22,7 +22,7 @@ /// Returns a array representing the hash of the stream. public static byte[] GetHash(this Stream stream) where T : HashAlgorithm { - MethodInfo create = typeof(T).GetMethod("Create", new Type[] { }); + MethodInfo create = typeof(T).GetMethod("Create", Array.Empty()); using T crypt = (T)create?.Invoke(null, null); return crypt?.ComputeHash(stream); }