polytronicgr / sharpkit

Automatically exported from code.google.com/p/sharpkit
0 stars 0 forks source link

Dictionary.Remove behaviour discrepancy #366

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In the .NET CLR, calling Dictionary.Remove on a key that's not in the 
dictionary does not throw an exception (it just returns false).

Repro:

Dictionary<int, int> d = new Dictionary<int, int>();
d[0] = 0;
d[1] = 1;
d.Remove(2);

This will throw an exception on SharpKit, but not on .NET.

Original issue reported on code.google.com by polofili...@gmail.com on 3 Sep 2014 at 3:00

GoogleCodeExporter commented 8 years ago

Original comment by sebastia...@gmail.com on 8 Oct 2014 at 11:08