What (if any) is the C# equivalent of Python’s itertools.chain method?
Python Example:
l1 = [1, 2]
l2 = [3, 4]
for v in itertools.chain(l1, l2):
print(v)
Results:
1
2
3
4
Note that I’m not interested in making a new list that combines my first two and then processing that. I want the memory/time savings that itertools.chain provides by not instantiating this combined list.
Enumerable.Concat(MSDN)