Merge branch 'master' of https://github.com/Liryna/swig into Liryna-master

* 'master' of https://github.com/Liryna/swig:
  [C#] Add ToArray to std_vector.i
diff --git a/Lib/csharp/std_vector.i b/Lib/csharp/std_vector.i
index 0d1476f..95543c2 100644
--- a/Lib/csharp/std_vector.i
+++ b/Lib/csharp/std_vector.i
@@ -114,6 +114,12 @@
       array.SetValue(getitemcopy(index+i), arrayIndex+i);
   }
 
+  public $typemap(cstype, CTYPE)[] ToArray() {
+    $typemap(cstype, CTYPE)[] array = new $typemap(cstype, CTYPE)[Count];
+    this.CopyTo(array);
+    return array;
+  }
+
   global::System.Collections.Generic.IEnumerator<$typemap(cstype, CTYPE)> global::System.Collections.Generic.IEnumerable<$typemap(cstype, CTYPE)>.GetEnumerator() {
     return new $csclassnameEnumerator(this);
   }