Autor Beitrag
Ivy
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 228



BeitragVerfasst: Mi 11.02.09 10:54 
Hallo,
ich hab ein kleines problem, sry bin blutiger anfänger in C#
also wenn ih mein programm kompiliere erscheint kurz die DOS box und ist sofort dann wieder weg.
von c++ kenn ich den befehl System("Pause"), aber wie macht man das in C#???

danke für die hilfe
gruß^^
bakachan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 503
Erhaltene Danke: 34

W7 (x64) Ultimate
C# / VB.NET (VS2010 Ultimate)
BeitragVerfasst: Mi 11.02.09 11:07 
Dein programm läuft also durch und schließt sich danach wieder?
Das ist normal.
Wenn du die letzte Ausgabe trotzdem noch in der Konsole sehen willst mach doch einfach am Ende ein Console.ReadKey();
danielf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1012
Erhaltene Danke: 24

Windows XP
C#, Visual Studio
BeitragVerfasst: Mi 11.02.09 11:07 
Hallo Ivy,

beim kompilieren? Ich nehme an, beim Ausführen...

Wenn du die statische Methode Console.ReadLine() aufrufst wartet dein Programm auf eine Eingabe die mit Enter abgeschlossen wird. Den "Bitte eine beliebige Taste drücken um fortzusetzen, ..." Output bekommst du über Console.WriteLine("text ..") hin.

Gruß Daniel
Ivy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 228



BeitragVerfasst: Mi 11.02.09 11:17 
hehe ja genau
funktioniert!! vielen dank =)
Console.Beep()
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 43

Win XP, Ubuntu 8.10
C# (VS 2008 Exp) C++ (VS 2008 Exp)
BeitragVerfasst: Do 12.02.09 11:40 
auch ne möglichkeit ist mit STRG+F5 zu debugen.