-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTEMPLATE_PROGRAM.txt
More file actions
33 lines (28 loc) · 834 Bytes
/
Copy pathTEMPLATE_PROGRAM.txt
File metadata and controls
33 lines (28 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
namespace <PROGRAM_TOPIC>;
class <PROGRAM_NAME>
{
public static void Main(string[] args)
{
Console.WriteLine(@"
---Welcom to <PROGRAM_NAME>---
Summary:
- <PROGRAM_SUMMARY_POINT1>
- <PROGRAM_SUMMARY_POINT2>...
");
// initialize variables
bool userExit = false;
// application loop, until userExit = true
try
{
while (!userExit)
{
// PROGRAM_CODE BELOW
// option for user to exit
Console.WriteLine("\nPress 'q' to exit or Enter to continue");
if(Console.ReadLine() == "q") { userExit = true; }
}
Console.WriteLine("\n---End <program_name>---\n");
}
catch (Exception ex) { Console.WriteLine($"ERROR : {ex.Message}\n---Terminate Program---\n"); }
}
}