C# Dictionary判断Key已存在

怎么判断Dictionary中,指定的Key已存在

if(dict.ContainsKey(T key))
{
   //已存在key
}


你可能感兴趣的:(C# Dictionary判断Key已存在)