Menu

#10 ContainerListViewItem.Clone

open
nobody
None
5
2008-12-15
2008-12-15
koalalotion
No

In ContainerListViewItem.Clone(), the capacity of the _subItems Collection was not set, so an ArgumentOutOfRangeException is raised, when setting SubItems.

Previous code:
for(int index = 0; index < _subItems.Count; ++index)
lvi._subItems[index] = _subItems[index].Clone();

My guess:
for(int index = 0; index < _subItems.Count; ++index)
lvi._subItems.Add(_subItems[index].Clone());

Besides that the two controls behave wonderful and I encountered nothing else (However, I'm pleased with just the basic features). Thanks!

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.