delphi how to get last element of an array code example
Example: get last element of array delphi
const
arrDays: array of string = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
begin
ShowMessage(arrDays[Length(arrDays) - 1]);
end;
const
arrDays: array of string = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
begin
ShowMessage(arrDays[Length(arrDays) - 1]);
end;