I have a List<bar>
of LinkedList<foo>
:
int x = y;
List<LinkedList<foo>> list = new List<LinkedList<foo>>(x);
I want to be able to move all elements of a LinkedList<foo>
of list
into another without create new list or nodes. This is why I choose a LinkedList<foo>
type. In C++, I could use std::list::splice
.
At the end, only one element of list
will not be empty.
My problem is that I can't find anyway to do this, I only found method that copy two LinkedList<foo>
into one or similar.
My research so far (this is not what I want):
- How does one add a LinkedList<T> to a LinkedList<T> in C#?
- Append LinkedList to the end of another LinkedList?
- https://msdn.microsoft.com/fr-fr/library/he2s3bh7.aspx
Note: I don't care about data order, I just need performance.