I realise this is already marked as answered, but I think that if you only want to delete a single key from a dictionary where the maximum size is not specified, making a copy of the ENTIRE dictionary just to remove one key is NOT a good solution!
To remove just one entry for a matching key, you can just do this:
foreach (var kvp in dict)
{
if (kvp.Key.Contains('/'))
{
dict.Remove(kvp.Key);
break;
}
}
No copies of entire dictionaries required!
Note that this assumes there's only one key to be removed. If there might be more, use Daniel's or Francesco's answers above.
(Actually, I'll recommend you just use Daniel's answer, but I'll leave this here as an example without using Linq.)