Is there any way to limit the size of a generic collection?
I have a Stack of WriteableBitmap which I am using to store a clone of a WriteableBitmap on each change,
You will have to check the size (You will get an exception I believe if you set a limit, and don't check if it's full).
Edit
You don't get an exception if the size has been set, but the size just increases so you do have to check the size (via http://msdn.microsoft.com/en-us/library/6335ax0f.aspx):-
If Count already equals the capacity, the capacity of the Stack is increased by automatically reallocating the internal array, and the existing elements are copied to the new array before the new element is added.