No, this seems perfectly reasonable. There is a List<T>.AddRange()
method that basically does just this, but requires your collection to be a concrete List<T>
.
More Related Contents:
- Distinct() with lambda?
- iterating through item of array of generic collections
- Find items in a string collection which contain another string [closed]
- Sort a list from another list IDs
- How do I use Moq to mock an extension method?
- What is the best way to clone/deep copy a .NET generic Dictionary?
- Impossible to use ref and out for first (“this”) parameter in Extension methods?
- Notify ObservableCollection when Item changes
- Bidirectional 1 to 1 Dictionary in C#
- Metadata file ‘.dll’ could not be found
- Why doesn’t Include have any effect?
- Will the dynamic keyword in C#4 support extension methods?
- How to modify or delete items from an enumerable collection while iterating through it in C#
- Can I “multiply” a string (in C#)?
- How to create a HashSet with distinct elements?
- What’s the max items in a List?
- What task is best done in a functional programming style?
- Does C# have a way of giving me an immutable Dictionary?
- Converting integers to roman numerals
- Thread safe collections in .NET
- What does Collection.Contains() use to check for existing objects?
- Extension method priority
- How do extension methods work?
- Count property vs Count() method?
- Is it appropriate to extend Control to provide consistently safe Invoke/BeginInvoke functionality?
- Recreating a Dictionary from an IEnumerable
- How can I loop through a List and grab each item?
- List readonly with a private set
- Is it possible to extend arrays in C#?
- Why can’t I call an extension method as a static method when using static import?