I have been struggling with this for some time now, so I decided to ask. How on earth can this :
throw a System.Collections.Generic.KeyNotFoundException?
PHP Code:
lock (Inventory)
{
if (Inventory.ContainsKey(UID))
{
Console.WriteLine("Removing key : " + UID);
if (Inventory[UID] != null)
Inventory.Remove(UID);
}
}