using System;
using System.IO;
class MainClass {
public static void Main() {
StringWriter strwtr = new StringWriter();
for(int i=0; i < 10; i++)
strwtr.WriteLine("This is i: " + i);
StringReader strrdr = new StringReader(strwtr.ToString());
string str = strrdr.ReadLine();
while(str != null) {
str = strrdr.ReadLine();
Console.WriteLine(str);
}
}
}
|