Replace element in a ListDictionary by indexer : ListDictionary « Collections « Visual C++ .NET






Replace element in a ListDictionary by indexer

 

#include "stdafx.h"
#using <system.dll>

using namespace System;
using namespace System::Collections;
using namespace System::Collections::Specialized;

void main()
{
    ListDictionary ^ldict = gcnew ListDictionary();

    ldict->Add("A", "First");
    ldict->Add("B", "Second");
    ldict->Add("C", "Third");
    ldict["D"] = "Fourth";
    

    ldict["B"] = "Second Replaced";
}

   
  








Related examples in the same category

1.Add to ListDictionary
2.Add to ListDictionary by Index
3.Add to ListDictionary by replacing