var myStrings = new string[10]; ... // заполняем массив File.WriteAllLines(Path.Combine(outputPath, "MyFile.dat"), myStrings);