是否IEnumerable的< TSource> Concat的< TSource> preserve元素的顺序? [英] Does IEnumerable<TSource> Concat<TSource> preserve the order of elements?

查看:107
本文介绍了是否IEnumerable的< TSource> Concat的< TSource> preserve元素的顺序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设两个列表,A和B,使得A =(1,2,3)和B =(4,5,6)。请问A.Concat(B)preserve的顺序,这样的结果是(1,2,3,4,5,6)?

Assume two lists, A and B so that A = (1,2,3) and B = (4,5,6). Will A.Concat(B) preserve the order so that the result is (1,2,3,4,5,6)?

推荐答案

是的。 IEnumerable.Concat将简单地把两个列表成一个单一的列表通过附加一个到另一个的末端。令每个列表中将会preserved。

Yes. IEnumerable.Concat will simply turn two list into a single list by attaching one to the end of the other. Order within each list will be preserved.

这篇关于是否IEnumerable的< TSource> Concat的< TSource> preserve元素的顺序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆