Notifications
Clear all

[Closed] dotNet listview node select

 PEN

When deleting items from an array always run backwards through the array. Consider if you have an array with three items in it and you want to delete the first and the last. If you run through it forwards you first delete item #1, this now leaves only two items in the array, so next you try and delete item #3 and it doesn’t exist any more.

So do it backwards. for i = array.count to 1 by-1 do. And what will happen is you will delete item number 3 first removing one item from the array so you now only have two. How ever the first item in the array still exists and can be deleted as well.

 PEN

You should look through all of the dotNet tutorials on my site and not just the one about listview. Also I have a function in a couple of them that will out put information about objects and classes so you know what you have to work with.

Page 2 / 2