From: Matt Corallo Date: Thu, 7 Sep 2023 16:20:31 +0000 (+0000) Subject: [C#] Make check_arr_len generic across array types X-Git-Tag: v0.0.117.0~16 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=41f5335b6b16b1fa806b9a413f0b6c79c4b8677f;p=ldk-java [C#] Make check_arr_len generic across array types --- diff --git a/c_sharp/src/org/ldk/util/InternalUtils.cs b/c_sharp/src/org/ldk/util/InternalUtils.cs index 620b3b3d..214420a8 100644 --- a/c_sharp/src/org/ldk/util/InternalUtils.cs +++ b/c_sharp/src/org/ldk/util/InternalUtils.cs @@ -2,7 +2,7 @@ using System; using org.ldk.util; internal class InternalUtils { - public static byte[] check_arr_len(byte[] arr, int length) { + public static T[] check_arr_len(T[] arr, int length) { if (arr != null && arr.Length != length) { throw new ArgumentException("Array must be of fixed size " + length + " but was of length " + arr.Length); }