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:
commit
6227013da4
1 changed files with 6 additions and 0 deletions
|
|
@ -114,6 +114,12 @@
|
||||||
array.SetValue(getitemcopy(index+i), arrayIndex+i);
|
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() {
|
global::System.Collections.Generic.IEnumerator<$typemap(cstype, CTYPE)> global::System.Collections.Generic.IEnumerable<$typemap(cstype, CTYPE)>.GetEnumerator() {
|
||||||
return new $csclassnameEnumerator(this);
|
return new $csclassnameEnumerator(this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue