Associative array/Creation: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 47: | Line 47: | ||
std::cerr << "colormap[\"" << i->first << "\"] = 0x" << std::hex << i->second << "\n"; |
std::cerr << "colormap[\"" << i->first << "\"] = 0x" << std::hex << i->second << "\n"; |
||
} |
} |
||
==[[C sharp|C#]]== |
|||
[[Category:C sharp]] |
|||
Map in .NET 1.x |
|||
System.Collections.HashTable map = new System.Collections.HashTable(); |
|||
map["key1"] = "foo"; |
|||
Map in .NET 2.0 |
|||
Dictionary<string, string> map = new Dictionary<string,string>(); |
|||
map[ "key1" ] = "foo"; |
|||
==[[Java]]== |
==[[Java]]== |