StringBuilder content = new StringBuilder(); for (int i = 0; i < 10; i++) { content.Append(i.ToString()); } String fileName = "D:\\res.txt"; File.WriteAllText(fileName, content.ToString());
String s = File.ReadAllText(fileName);