我想迭代一个列表并只显示包含特定单词的项目。例如,我有List<string> {"one","two",three",four","one"}. 我只想显示:"one, one"。
List<string> {"one","two",three",four","one"}
"one, one"
这是我所拥有的:
string strnumbers = ""; foreach (var v in numbers) { strnumbers += v + ","; }
c#
c# ×1