Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Uncommon elemets of collection during runtime

Status
Not open for further replies.

WomanPro

Programmer
Nov 1, 2012
180
GR
Hello anybody. I need some guide please. Well I want to store in a collection array values that produced during runtime. First of all, I don't know how to add the values to the collection at runtime.
Secondly, I have a second collection array with standard values when the first collection array is complete with all the values, I need to find all the uncommon values between two collections and store them to a list. Is it possible to do that and how? Any help will be much appreciated. Thank you so much in advanced.
 
It's ok, solved like that. I am not good at collections but it worked better for me with lists.
Dim arr1 As New List(Of Byte)
arr1.Add(10) : arr1.Add(30) : arr1.Add(50)

Dim arr2 As New List(Of Byte) From {10, 20, 30, 40, 50, 60}
Dim ExceptionArr As IEnumerable(Of Byte) = arr2.Except(arr1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top