Autor Beitrag
spitzname
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 27



BeitragVerfasst: Mi 28.04.10 14:32 
Hallo, wie kann man das machen, dass bei dem folgenden code, nach dem der Benutzer j eingegeben hat, Bildschirmausgabe gelöscht wird? Und das Programm fängt dann wieder automatisch von oben an.

Würde mich über Tipps freuen.

ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
static void Main(string[] args) {
        
            bool Nochmal = true;
            do {
                
                
                
                Console.Write("wie heisst du   );
                Console.Write("
===================================\n\n");
                Console.Write("
Eingabe     : ");
                string name = Console.ReadLine(); 
                Console.WriteLine("
name: {o}", name);

                Console.Write("
nochmal:(j / n)? ");
                if(Console.ReadLine() != "
j")

                {
                    Nochmal = false;
                    
                }
                
           } while (Nochmal);
}//ende main


gruß spitzname

Moderiert von user profile iconChristian S.: Code- durch C#-Tags ersetzt
danielf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1012
Erhaltene Danke: 24

Windows XP
C#, Visual Studio
BeitragVerfasst: Mi 28.04.10 14:43 
Das steht hier.
JüTho
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2021
Erhaltene Danke: 6

Win XP Prof
C# 2.0 (#D für NET 2.0, dazu Firebird); früher Delphi 5 und Delphi 2005 Pro
BeitragVerfasst: Mi 28.04.10 14:45 
Schau einmal in die SDK-Doku/MSDN/Hilfe, was die Console-Klasse alles anbietet. Unter den Methoden gibt es eine mit folgendem Inhalt (leider kann ich den DocExplorer unter Win7 nicht auf Deutsch umschalten):
Zitat:
Clears the console buffer and corresponding console window of display information.

Jürgen
spitzname Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 27



BeitragVerfasst: Mi 28.04.10 14:52 
Danke euch! ich habe es :-)