forked from Fred3267/Data-Structure-Assignment
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
48 lines (43 loc) · 1.66 KB
/
Program.cs
File metadata and controls
48 lines (43 loc) · 1.66 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
int iNum;
string
Console.WriteLine("Enter your Options\n");
Console.WriteLine("1. Stack");
Console.WriteLine("2. Queue");
Console.WriteLine("3. Dictionary");
Console.WriteLine("4. Exit\n");
sNum = Console.Read();
while(Int32.TryParse(iNum))
do{
do
{
if (bFirstTime == false)
{
Console.WriteLine("Please Enter a number between 1-7");
}
Console.WriteLine("Enter your Options\n");
Console.WriteLine("1. Add one item to Dictionary");
Console.WriteLine("2. Add Huge List of Items to Dictionary");
Console.WriteLine("3. Display Dictionary");
Console.WriteLine("4. Delete from Dictionary");
Console.WriteLine("5. Clear Dictionary");
Console.WriteLine("6. Search Dictionary");
Console.WriteLine("7. Return to Main Menu");
sDictMenu = Console.ReadLine();
bFirstTime = false;
} while (Int32.TryParse(sDictMenu, out iDictMenu) == false);
iDictMenu = Convert.ToInt32(sDictMenu);
} while (iDictMenu <= 1 || iDictMenu >= 7);
}
}
}