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
This commit is contained in:
William S Fulton 2018-01-12 18:02:33 +00:00
commit 6227013da4

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