I need to remove an item from the list.Do you need the reference to be equal or the content?
Remove an item from the list.What do you want to achieve?
It doesn't matter. An item cannot be removed from the list once it's added.Do you only need it to remove the first array or do you want to remove an arbitrary one?
yourNode.Remove()
If you don't mind the content to be compared it might be better using a List of Lists instead of a List of arrays.I need to remove an item from the list.
Strict
Function Main:Int()
Local L:List<Float[]> = New List<Float[]>()
Local arr1:Float[]=[1.0,2.0]
Local arr2:Float[]=[3.0,4.0]
Local arr3:Float[]=[1.0,2.0]
Print L.Count() + " Arrays left."
L.AddFirst(arr1)
L.AddFirst(arr2)
L.AddFirst(arr3)
Print L.Count() + " Arrays left."
Local foundNode:list.Node<Float[]>
foundNode = L.FirstNode()
If foundNode foundNode.Remove
foundNode = L.FirstNode()
If foundNode foundNode.Remove
Print L.Count() + " Arrays left."
Return 0
End
This way you could store the node in it tooAnother way would be to wrap the array in a class and have a comparison for the class.