Question about lists
Monkey Forums/Monkey Programming/Question about lists
| ||
Hi, How I can delete a single (not the first or the last) item inside a list? Thanks |
| ||
Two options, the first is to remove each: [monkeycode] myList.RemoveEach( item ) [/monkeycode] the other option, which is faster is to store the node when you add the item to the list and then you can remove the node like this (removing the item from the list): [monkeycode] 'stores node field lnk : list.Node< Type > 'add item and store node lnk = myList.AddFirst( item ) 'removes item lnk.Remove() [/monkeycode] |
| ||
I use it.For Local g:Item = Eachin ItemList If Item(g) Then ItemList.RemoveEach(g) Next |