Let's bring together everything you've learned so far — variables, lists, methods, loops, conditions, and class concepts — to build a small Task Manager Console App. It's a simple project, but it'll give you a real feel for the data models, collections, and method breakdowns you'll find in actual apps.
csharp
using System;
using System.Collections.Generic;
class TaskItem
{
public string Title { get; set; }
public bool IsDone { get; set; }
public TaskItem(string title)
{
Title = title;
IsDone = false;
}
}
class Program
{
static void PrintTasks(List<TaskItem> tasks)
{
for (int i = 0; i < tasks.Count; i++)
{
string status = tasks[i].IsDone ? "Done" : "Pending";
Console.WriteLine($"{i + 1}. {tasks[i].Title} - {status}");
}
}
static void Main(string[] args)
{
List<TaskItem> tasks = new List<TaskItem>();
tasks.Add(new TaskItem("Learn C# variables"));
tasks.Add(new TaskItem("Practice methods"));
tasks.Add(new TaskItem("Build mini project"));
tasks[1].IsDone = true;
PrintTasks(tasks);
}
}What's in this project
TaskItemclass is the data model for a single task.Titlestores the task name, andIsDonestores its done/not-done status.List<TaskItem>holds all the tasks.PrintTasksmethod displays the task list on screen.tasks[1].IsDone = true;marks the second task as completed.
You should see
1. Learn C# variables - Pending 2. Practice methods - Done 3. Build mini project - PendingInfo
🚀 Ways to take it further
You could add features like reading tasks from user input, deleting tasks, saving to a file, adding due dates, or search/filter. At that point, this humble console app is well on its way to becoming a real productivity app.