diff Util/ArrayUtil.cs @ 43:29cf42a12c34

Added convenience functions in NaCl API and ArrayUtils
author Ivo Smits <Ivo@UCIS.nl>
date Thu, 23 May 2013 17:02:17 +0200
parents b9ef273964fd
children f553f6e0a396
line wrap: on
line diff
--- a/Util/ArrayUtil.cs	Wed May 01 23:44:43 2013 +0200
+++ b/Util/ArrayUtil.cs	Thu May 23 17:02:17 2013 +0200
@@ -22,6 +22,9 @@
 		public static T[] ToArray<T>(ArraySegment<T> input) {
 			return Slice(input.Array, input.Offset, input.Count);
 		}
+		public static T[] ToArray<T>(T[] input) {
+			return (T[])input.Clone();
+		}
 		public static IList<T> ToList<T>(IEnumerable<T> input) {
 			return new List<T>(input);
 		}