Mega Code Archive

 
Categories / Visual C++ .NET / Collections
 

Assign value to a StringDictionary by using indexer

#include "stdafx.h" #using <system.dll> using namespace System; using namespace System::Collections; using namespace System::Collections::Specialized; void main() {     StringDictionary ^strdict = gcnew StringDictionary();     strdict->Add("D", "d");     strdict->Add("F", "f");     strdict["C"] = "c"; }