I need to sort a TArray<integer>
, I've added System.Generics.Collections
to the uses
clause and then I've tried the following code:
var
Arr : TArray<integer>;
begin
SetLength(Arr, 2);
Arr[0] := 5;
Arr[1] := 3;
TArray.Sort(Arr);
ShowMessage(IntToStr(Arr[0]));
end;
On compiling it produces an E2250 error saying:
[dcc32 Error] Unit1.pas(39): E2250 There is no overloaded version of 'Sort' that can be called with these arguments