Answers for "vb.net list remove"

VBA
0

how to remove an item from a list in vb.net

Dim aList As New List(Of String)
aList.Add("Hello")
aList.Add("Delete Me!")
aList.Add("World")

'Remove the item from the list at index 1
aList.RemoveAt(1)

'Remove a range of items from a list, starting at index 0, for a count of 1)
'This will remove index 0, and 1!
aList.RemoveRange(0, 1)

'Clear the entire list
alist.Clear()
Posted by: Guest on January-14-2021

Code answers related to "VBA"

Browse Popular Code Answers by Language