[ source lang="csharp"] <-- remove space before 'source'
using System;
using System.IO;
class Test {
private static void Main() {
for (int i = 0; i < 5000; i++) {
using (TextWriter w = File.CreateText("C:\\tmp\\test\\log" + i + ".txt")) {
string msg = DateTime.Now + ", " + i;
w.WriteLine(msg);
Console.Out.WriteLine(msg);
}
}
Console.In.ReadLine();
}
}
[ /source ]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement