Ask Question
4 August, 22:50

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

+5
Answers (1)
  1. 5 August, 01:13
    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?
Get an answer to your question ✅ “Perform the Insert, Modify and Remove functionalities on the Dictionary based on the Key. ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers