参考链接:https://blog.csdn.net/zdyueguanyun/article/details/51392477
if(Dictionary.ContainsKey(key))
{
//已存在key
}
偏方:仅供参考,不推荐使用
参考链接:https://blog.csdn.net/a_dev/article/details/79931353
key:需要判断的Key
if (Dictionary.Keys.Any() = (e) => { 0 == string.Compare(e,key); })
{
}
string sValue = "";
if (Dictionary.TryGetValue(key, out sValue))
{
}