Project: Array Utilities Unit
Unit: DelphiDabbler.Lib.ArrayUtils
Record: TArrayUtils
Applies to: ~>0.1
class function Last<T>(const A: array of T): T;
static;
Returns the last element of a non-empty array.
Parameters:
Returns:
Precondition:
procedure Last_Eg;
var
A: TArray<Integer>;
begin
A := TArray<Integer>.Create(1, 2, 3);
Assert(TArrayUtils.Last<Integer>(A) = 3);
end;