【发布时间】:2019-05-10 12:16:29
【问题描述】:
我需要有关此代码的帮助。我想像这样在 foreach 循环中拆分单词,但我不想在最后一个单词后面加上,。有什么建议吗?
var listOtherWords = (from o in Words
where !o.ToUpper().StartsWith("A")
where !o.ToUpper().StartsWith("B")
where !o.ToUpper().StartsWith("C")
select o).ToList();
Console.WriteLine();
Console.Write("Other Words: ");
foreach (string o in lisOtherWords)
{
Console.Write(o + " ,");
}
Console.ReadLine();
【问题讨论】: