ImageList: Disposing the original image removes it from the list
ImageList should create a copy of all images that are inserted into it. Therefore it should be safe to dispose the originals after adding them to the list. Why does the following testcase fail? Bitmap test = new Bitmap(128, 128); ImageList il = new ImageList(); il.Images.Add(test); Assert.AreEqual(1, il.Images.Count); // OK, image has been inserted test.Dispose(); // now let's dispose the original try { var retrievalTest = il.Images[0]; } catch (ArgumentException) // ... but this Exception happens! { } Assert.AreEqual(1, il.Images.Count); // and this will fail What seems to happen here is this