foreach (KeyValuePair<int, string> kvp in myDictionary) {...}
 Dictionary<string, string> openWith =
          new Dictionary<string, string>();

          
            openWith.Add("txt", "notepad.exe");
            openWith.Add("bmp", "paint.exe");
            openWith.Add("dib", "paint.exe");
            openWith.Add("rtf", "wordpad.exe");

 

Console.WriteLine( openWith["txt"]);

 

posted on 2013-12-03 20:22  梁娜  阅读(173)  评论(0编辑  收藏  举报