asp.netvb.netgenerics.net-2.0performance

What's the most efficient way to combine two List(Of String)?


Let's say I've got:

Dim los1 as New List(Of String)
los1.Add("Some value")

Dim los2 as New List(Of String)
los2.Add("More values")

What would be the most efficient way to combine the two into a single List(Of String)?

Edit: While I love the solutions everyone has provided, I probably should have also mentioned I'm stuck using the .NET 2.0 framework.


Solution

  • I think

    los1.AddRange(los2)