📜  创建文本文件 delphi - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:33.050000             🧑  作者: Mango

代码示例1
procedure MakeAStringlistAndSaveThat;
var
  MyText: TStringlist;
begin
  MyText:= TStringlist.create;
  try
    MyText.Add('line 1');
    MyText.Add('line 2');
    MyText.SaveToFile('c:\folder\filename.txt');
  finally
    MyText.Free
  end; {try}
end;