-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.cs
38 lines (32 loc) · 809 Bytes
/
main.cs
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
using System;
using System.Collections.Generic;
namespace TaskManagerApp
{
class TaskManager
{
List<string> tasks = new List<string>();
public void AddTask(string task)
{
tasks.Add(task);
}
public void ListTasks()
{
Console.WriteLine("Tasks:");
foreach (var task in tasks)
{
Console.WriteLine(task);
}
}
}
class Program
{
static void Main(string[] args)
{
TaskManager taskManager = new TaskManager();
taskManager.AddTask("Complete project proposal");
taskManager.AddTask("Prepare presentation");
taskManager.AddTask("Review code");
taskManager.ListTasks();
}
}
}