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