I am trying to create an arraylist of unique elements from two arraylists using Vb.net & linq but I get the following error on the last line of the embedded code.
"Unable to cast object of type '<DistinctIterator>d__81`1
ject]' to type 'System.Collections.ArrayL
this is my code:
Dim arr1 as arraylist=some mixture of integers and strings
Dim arr2 as arraylist=some mixture of integers and strings
Dim arr As New ArrayList
Dim DistinctArray As New ArrayList
Dim pos As Integer
Dim str As String
DistinctArray = (From s In arr Select s).Distinct
I am not really that familiar with linq so I'd love any help.