diff options
author | jfrijters <jfrijters> | 2011-03-17 17:40:50 +0300 |
---|---|---|
committer | jfrijters <jfrijters> | 2011-03-17 17:40:50 +0300 |
commit | 87c2970ea87fe2f43224fb0d3be1093e458701d5 (patch) | |
tree | f910d89de71defc9d519fbd28ab346550d536fed /reflect/Util.cs | |
parent | ee5fc81328bdc3b71eef5683574cb81260e303d6 (diff) |
Added support for array Type sizes/lower bounds.
Diffstat (limited to 'reflect/Util.cs')
-rw-r--r-- | reflect/Util.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/reflect/Util.cs b/reflect/Util.cs index ca457d3e..1a95679a 100644 --- a/reflect/Util.cs +++ b/reflect/Util.cs @@ -84,6 +84,17 @@ namespace IKVM.Reflection static class Util { + internal static int[] Copy(int[] array) + { + if (array == null || array.Length == 0) + { + return Empty<int>.Array; + } + int[] copy = new int[array.Length]; + Array.Copy(array, copy, array.Length); + return copy; + } + internal static Type[] Copy(Type[] array) { if (array == null || array.Length == 0) |