I submitted an expansion proposal at Embarcadero.
http://qc.embarcadero.com/wc/qcmain.aspx?d=110391
You may like to vote for it, so it will soon be integrated.
For all Delphi versions from 2009, you can upgrade this as a class helper.
Otherwise, these methods can of course also copy out and use directly.
Zitat:
procedure SwapArrayElements(aStartElement: Pointer; aElementSize, aElementCount: Integer);
Or you get the necessary information about the
RTTI/TypeInfo.
Delphi-Quellcode:
procedure SwapArrayElements(var TheArray; ArrTypeInfo: Pointer);
var MyArr: array of ...;
SwapArrayElements(MyArr, TypeInfo(MyArr));
Ein Therapeut entspricht 1024 Gigapeut.