如何在某些条件下连接列表字符串?给我一些例子 [英] How to concatenate list strings under some condition?give me some example
本文介绍了如何在某些条件下连接列表字符串?给我一些例子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在linq查询中的某些条件下连接列表字符串?给我一些例子
How to concatenate list strings under some conditions in linq query?give me some example
推荐答案
List<string> test = new List<string>(){"aa","bb","ccc"};
var result =String.Join(", ", test.Where(s=>s.Length <3));
您将获得 aa,bb
这篇关于如何在某些条件下连接列表字符串?给我一些例子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文