Code:
using System;
using System.Collections.Generic;
class Program
{
static void Main()
{
Dictionary
dict["Tom"] = "Bob";
WriteKeyA(dict);
SortedDictionary
sort["Tom"] = "Jerry";
WriteKeyA(sort);
Console.ReadLine();
}
static void WriteKeyA(IDictionary
{
Console.WriteLine(i["Tom"]);
}
}
Output:
Bob
Jerry
More C# Programs: