[C#] Add ToArray to std_vector.i

This commit is contained in:
Quentin 2017-10-19 09:45:57 +02:00 committed by Adrien JUND
commit 4326da9ab3

View file

@ -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);
}