文字列の配列を1行ごとテキストファイルに書き出すプログラムになります。
const string textFile = @".\sample.txt";
string textData = "ABCDE\n012345\n日本語。";
string[] lines = textData.Split("\n");
using StreamWriter sw = new (textFile, false);    // 上書き
foreach(string line in lines)
{
    sw.WriteLine(line);
}
結果(sample.txtの内容)
ABCDE
012345
日本語。
  
  
  
  

コメント