Does Linq/.NET3.5 support a 'zip' method?

前端 未结 2 768
难免孤独
难免孤独 2021-01-12 21:17

In other languages (ruby, python, ...) I can use zip(list1, list2) which works like this:

If list1 is {1,2,3,4} and list2 is {a,b,c}<

2条回答
  •  心在旅途
    2021-01-12 21:43

    .NET 4 gives us a Zip method but it is not available in .NET 3.5. If you are curious, Eric Lippert provides an implementation of Zip that you may find useful.

提交回复
热议问题