TStringList vs. TList

前端 未结 8 1878
野性不改
野性不改 2021-02-05 02:31

what is the difference in using a standard

type 
  sl: TStringList 

compared to using a generic TList

type 
  sl: TList

        
8条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-05 03:01

    • As TStringList is a descendant of TStrings it is compatible with the Lines property of TMemo, Items of TListbox and TComboBox and other VCL components. So can use cbList.Items := StringList; // internally calls TStrings.Assign

提交回复
热议问题