I have a public property set in my form of type ListE<T>
where:
public class ListE<T> : IList<T>, ICollection<T>, IEnumerable<T>, IList, ICollection, IEnumerable
Yeah, it's a mouthful, but that's what the Designer requires for it to show up as an editable collection in the Properties window. Which it does! So, I click the little [..] button to edit the collection, and then click Add to add an item to the collection.
Arithmetic operation resulted in an overflow.
Now, this is a very basic List, little more than an expanding array. The only part that comes close to arithmetic in the whole thing is in the expand function, and even that uses a left shift rather than a multiplication, so that won't overflow. This all makes me think that this exception is being raised inside the Designer, perhaps caused by some small inattention to implementation detail on my part, but I can't find a way to test or debug that scenario. Does anyone have any smart ideas?
EDIT: Yes, I can use the property successfully, well even manually, ie. in the OnLoad
handler, and I suppose that's what I'll have to resort to if I can't get this working, but that wouldn't be ideal. :(