You can use the dictionary's ContainsKey () method to find out if the dictionary already contains your key or not
dict.ContainsKey(Key)
it returns a true if the dictionary contains a key, otherwise returns false
,
if(dict.ContainsKey(Key))
{
dict[key]=YOUR_NEW_VALUE;
}
else
{
dict.Add ( key,YOUR_NEW_VALUE);
}