What (if any) is the C # equivalent for the itertools.chain Python method?
Python example:
l1 = [1, 2] l2 = [3, 4] for v in itertools.chain(l1, l2): print(v)
Results:
1
2
3
4
Please note: I am not interested in creating a new list that combines my first two and then processes them. I want to save the memory / time that itertools.chain provides without instantiating this merged list.
source share