Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/cecil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbevain <jbevain@gmail.com>2010-05-01 20:49:22 +0400
committerjbevain <jbevain@gmail.com>2010-05-01 20:49:22 +0400
commit473b44c41cefd210e1f9a37421ee5fe127dd3857 (patch)
tree62ab54249c034f1a56ae881cee73cd96d916484d /Mono.Collections.Generic
parentd1d138b7dd5e6c9f0d1adc63cac9a7509ca5caab (diff)
add ToArray
Diffstat (limited to 'Mono.Collections.Generic')
-rw-r--r--Mono.Collections.Generic/Collection.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Mono.Collections.Generic/Collection.cs b/Mono.Collections.Generic/Collection.cs
index 7e7f3fe..0fbfccf 100644
--- a/Mono.Collections.Generic/Collection.cs
+++ b/Mono.Collections.Generic/Collection.cs
@@ -189,6 +189,13 @@ namespace Mono.Collections.Generic {
Array.Copy (items, 0, array, arrayIndex, size);
}
+ public T [] ToArray ()
+ {
+ var array = new T [size];
+ Array.Copy (items, 0, array, 0, size);
+ return array;
+ }
+
void CheckIndex (int index)
{
if (index < 0 || index > size)