I have the following scenario:
procedure SomeMethod(SomeList: array of string);
I have to call this method with some IDs from a DataSet, I know I can do it this way:
var
MyArray: array of string;
I: Integer;
begin
SetLength(MyArray, MyDataSet.RecordCount);
I := 0;
MyDataSet.First;
while not MyDataSet.Eof do
begin
MyArray[I] := MyDataSetID.Value;
Inc(I);
MyDataSet.Next;
end;
SomeMethod(MyArray);
end;
I'm lazy as hell and this is too much work for my liking... I want an easier way for doing this, any ideas?