static void Main(string[] args)
{

Dictionary<int, string> book = new Dictionary<int, string>();
book.Add(0, "str_0");
book.Add(3, "str_3");
string _out="";
book.TryGetValue(0,out _out);
if(book.TryGetValue(1, out _out))
{
Console.WriteLine(_out);
}
Console.ReadKey();
}

这个trygetvalue是被推荐使用的方法