Horje
hash table in c# Code Example
hash table in c#
Hashtable numberNames = new Hashtable();
numberNames.Add(1,"One"); //adding a key/value using the Add() method
numberNames.Add(2,"Two");
numberNames.Add(3,"Three");

//The following throws run-time exception: key already added.
//numberNames.Add(3, "Three"); 

foreach(DictionaryEntry de in numberNames)
    Console.WriteLine("Key: {0}, Value: {1}", de.Key, de.Value);
		
//creating a Hashtable using collection-initializer syntax
var cities = new Hashtable(){
	{"UK", "London, Manchester, Birmingham"},
	{"USA", "Chicago, New York, Washington"},
	{"India", "Mumbai, New Delhi, Pune"}
};
		
foreach(DictionaryEntry de in cities)
    Console.WriteLine("Key: {0}, Value: {1}", de.Key, de.Value);




Csharp

Related
entity framework where date between Code Example entity framework where date between Code Example
resize image and add watermark c# Code Example resize image and add watermark c# Code Example
The anti-forgery cookie token and form field token do not match. Code Example The anti-forgery cookie token and form field token do not match. Code Example
dapper execute with list of ids Code Example dapper execute with list of ids Code Example
funciones en C# Code Example funciones en C# Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9