Ask Question
8 November, 12:11

Perform the Insert, Modify and Remove functionalities on the Dictionary based on the Key.

+4
Answers (1)
  1. 8 November, 14:59
    0
    Dictionary contains Key value pairs where key is used to retrieve the value

    Explanation:

    Using System. Collections;

    void main () {

    Dictionary dict = new Dictionary ();

    dict. Add (1,"One");

    dict. Add (2,"Two");

    dict. Add (3,"Three");

    dict. Remove (1);

    dict[2] = "Two Updated";

    }

    Dictionary is a dictionary whose keys are integers and values are strings.

    Add function is used to add elements to the dictionary

    Remove function removes the key value pair from the dictionary based on given key.

    we can directly modify/update the element in dictionary using the key
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Perform the Insert, Modify and Remove functionalities on the Dictionary based on the Key. ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers