Skip to content

Commit b78b7f7

Browse files
committed
Add code
1 parent f4072d3 commit b78b7f7

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

SaveWin10Pictures/Program.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,15 @@ private static void Main()
106106

107107

108108
// keeps running for pc up all the time until Q key is pressed
109-
while (true)
109+
110+
do
110111
{
111112
Console.ForegroundColor = ConsoleColor.Yellow;
112-
display("Press q to quit or let it run forever:");
113-
// Console.ReadKey();
114-
if (Console.ReadKey() == ConsoleKeyInfo)
115-
{
113+
display("Press Q to quit or let it run forever:");
114+
cki = Console.ReadKey();
116115

117-
}
118-
}
116+
117+
} while (cki.Key != ConsoleKey.Q);
119118

120119
Console.ForegroundColor = ConsoleColor.Yellow;
121120
display("Press any key to exit:");

0 commit comments

Comments
 (0)