Novice linq user but prim_clus_list &ref_clus_list are a List and ref_clus & prim_clus are strings. I'm trying to do the following but it's not working.
string[] clus_list = prim_clus_list.Union(ref_clus_list).Union(ref_clus.ToList()).Union(prim_clus.ToList()).ToArray<string>();
How can I do this in one line? I want them all in one list with no duplicates.
CS1928: 'System.Collections.Generic.IEnumerable' does not contain a definition for 'Union' and the best extension method overload 'System.Linq.Queryable.Union(System.Linq.IQueryable, System.Collections.Generic.IEnumerable)' has some invalid arguments
Also this alone works fine:
string[] clus_list = prim_clus_list.Union(ref_clus_list).ToArray<string>();
ref_clusisstring, thenref_clus.ToList().ToList()shouldn't compile, unless you have extension methods for string