我有两个字符串数组
Array1 = {"Paul","John","Mary"}
Array2 = {"12","13","15"}
我想知道是否可以加入这些数组,以便生成的数组具有类似
{"Paul12","John13","Mary15"}
我有两个字符串数组
Array1 = {"Paul","John","Mary"}
Array2 = {"12","13","15"}
我想知道是否可以加入这些数组,以便生成的数组具有类似
{"Paul12","John13","Mary15"}
var Array3 = Array1.Zip(Array2, (a, b) => a + b).ToList();
您可以使用Zip
.
var array1 = new[] {"Paul", "John", "Mary"};
var array2 = new[] {"12", "13", "15"};
var result = array1.Zip(array2, (a1, a2) => String.Concat(a1, a2)).ToArray();