Storing a record in a TList with different struct
Posted on 2010-09-18
What is the best way to identify wich kind of record is in the list?
TSomethingA = record //A = ANSI
chBla: array [0..9] of AnsiChar;
PSomethingA = ^TSomethingA;
TSomethingW = record //W = UNICODE
chBla: array [0..9] of WideChar;
PSomethingW = ^TSomethingW;
//the lsList is created and inside has a lot of PSomethingW and PSomethingA stored
//now, walking in lsList, an item can be of type SomethingA or SomethingW
for i := 0 to Pred(lsList.Count) do
//what is the best method to identify, if the current item "lsList[ i ]" is a SomethingA or SomethingW?