with TStringList.Create do try
  Add('第一行');
  Add('第二行');
  Add('第三行');
  SaveToFile('c:\temp.txt');
finally
  Free;
end;