managing array of structures vb.net
i need to work with 100,000
list of data. sometimes need to remove an item close to the end or middle.
Structure Proxy
Dim ID as Integer
Dim Server As String
开发者_如何学运维 Dim Port As Integer
End Structure
dim oProxy(100,000) as Proxy
what is the best way to add, delete from any location within the arrays of structures structure
as you know looping to to remove from the middle or end can be a pain. should i use list<>
instead?
EDIT
I would like to remove an item by ID
how do you find the item you want to remove? do you have its index available or do you remove it after server and port and need to search it?
because the later i would use a hashed option. Dictionary in .net http://msdn.microsoft.com/en-us/library/xfhwa508.aspx in that case finding the item you want to remove is your bigest concern.
other wise a List<> would be fine..... dont use arrays because of 100 000 items ;D
精彩评论