Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using System;
using System.Collections.Generic;
class Program
{
static void Main()
{
Dictionary<int, string> students = new Dictionary<int, string>();
students.Add(1, "Alice");
students.Add(2, "Bob");
students.Add(3, "Charlie");
Console.WriteLine("Student with ID 2: " + students[2]);
Console.WriteLine("All Students:");
foreach (var item in students)
{
Console.WriteLine($"ID: {item.Key}, Name: {item.Value}");
}
}
}Coding works best on desktop or with an external keyboard.