insert Summary Inserts a key-value pair into the dictionary. Usage public void insert(string key, T value) Parameters key The key to insert. value The value to associate with the inserted key. Description Inserts a key-value pair into the dictionary. This method is an alternative for the dict[key] = value syntax. Examples Basic Usage 123456789import System; Dictionary<int> dict = { a: 1, b: 2, c: 3 }; dict.insert("d", 4);Console.log(dict["d"]); // 4 dict["e"] = 5; // does the same thing as 'insert'Console.log(dict["e"]); // 5 Share HTML | BBCode | Direct Link