
Untitled
By: a guest on
May 16th, 2012 | syntax:
C# | size: 1.38 KB | hits: 21 | expires: Never
public static void Main(string[] args)
{
string text;
int index;
char[] test = { (char)32, (char)32, (char)32, (char)32, (char)32, (char)32};
DateTime anfang = DateTime.Now;
for(int i = 0; i < 10000; i++){
if(test[5] == 126){
for(int x = 5; x >= 0; x--){
if(test[x] == 126){
if(test[x - 1] != 126){
index = (int)test[x-1];
index++;
test[x - 1] = (char)index;
for(int y = x; y <= 5; y++){
test[y] = (char)33;
}
break;
}
}
}
}
else{
test[5]++;
}
text = "";
if((int)test[4] != 32){
if((int)test[3] != 32){
if((int)test[2] != 32){
if((int)test[1] != 32){
if((int)test[0] != 32){
text = text + test[0].ToString();
}
text = text + test[1].ToString();
}
text = text + test[2].ToString();
}
text = text + test[3].ToString();
}
text = text + test[4].ToString();
}
text = text + test[5].ToString();
Append("C:\\Users\\awiedenfeld\\Documents\\Seminar\\test.txt", i, text, false);
if(i%1000 == 0){
Console.WriteLine(i.ToString());
}
}
DateTime ende = DateTime.Now;
Console.WriteLine(ende.Subtract(anfang).ToString());
Console.Write("Press any key to continue . . . ");
Console.ReadKey(true);
}