using System.Collections.Generic;
public static void Main()
IDictionary<string, string> example =
new Dictionary<string, string>();
example.Add("txt", "notepad.exe");
example.Add("bmp", "paint.exe");
example.Add("dib", "paint.exe");
example.Add("rtf", "wordpad.exe");
string tempUri = "Something's seriously wrong.";
if (example is Dictionary<string, string>)
var tempDict = example as Dictionary<string, string>;
if (!tempDict.TryGetValue("bmp", out tempUri))
Console.WriteLine("Nope.");
Console.WriteLine( string.Format("Value = {0}", tempUri ));