projects
/
ldk-java
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c677773
)
[C#] Make check_arr_len generic across array types
author
Matt Corallo
<git@bluematt.me>
Thu, 7 Sep 2023 16:20:31 +0000
(16:20 +0000)
committer
Matt Corallo
<git@bluematt.me>
Thu, 7 Sep 2023 16:20:31 +0000
(16:20 +0000)
c_sharp/src/org/ldk/util/InternalUtils.cs
patch
|
blob
|
history
diff --git
a/c_sharp/src/org/ldk/util/InternalUtils.cs
b/c_sharp/src/org/ldk/util/InternalUtils.cs
index 620b3b3db493bc67556c78f22c76e078b0a39f0e..214420a8bd249af0f252da43b43f4953f118fe7b 100644
(file)
--- 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>(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);
}