Ian Ringrose Ian Ringrose - 1 year ago 103
Vb.net Question

How do I use Union in linq (vb.net)?

I know how to call the Union extension method, e.g.

Dim r = productFirstChars.Union(customerFirstChars)

However I do I do this with the Linq syntax, e.g.

from productFirstChars select ????

Answer Source

You can't - not all LINQ operators are supported in query expressions, and Union is one of those that isn't. (VB has language support for more query operators than C#, as it happens.) See the documentation for a list of supported query clauses.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download