using System;
using System.Collections.Generic;
namespace MyCompiler {
class Program {
public static void Main(string[] args) {
var map = new Dictionary<int, int>();
// add entry to dictionary; throws an error if key already exists
map.Add(1, 100);
Console.WriteLine(map[1]);
// update an entry in dictionary; add entry if key does not exist
map[1] = 200;
Console.WriteLine(map[1]);
}
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: