TextReader tr = new StreamReader("c:\\date.txt"); // read a line of text String s1 = tr.ReadLine(); // close the stream //String s1 = "One Two Three Four"; char[] seps = {' '}; String[] values = s1.Split(seps); TextWriter tw1 = new StreamWriter("d:\\bdate1.txt"); // write a line of text to the file // close the stream for (int i = 0; i < values.Length; i++) { tw1.WriteLine(values[i]); } tr.Close(); tw1.Close();
tw1.WriteLine(Environment.NewLine);
tw1.WriteLine("\r\n");
tw1.WriteLine();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)