Using TStringList's AddObject with integers?
Using delphi 7: How can I add an integer to the object portion of a stringlist item, using AddObject ? How can I retrieve the integer back from a object property of stringlist item? How do I free all objects and list when done? Q: How can i add an integer to the object portion of a stringlist item, using AddObject? A: Just cast the integer value to TObject List.AddObject('A string',TObject(1)); Q: How can a retrieve the integer back from a object property of stringlist item? A: Cast to integer the Object Value AValue := Integer(List.Objects[i]); Q: How do i free all objects and list when done?