【发布时间】:2010-07-08 22:43:46
【问题描述】:
是的......这是那些日子之一。
public string TagsInput { get; set; }
//further down
var tagList = TagsInput.Split(Resources.GlobalResources.TagSeparator.ToCharArray()).ToList();
tagList.ForEach(tag => tag.Trim()); //trim each list item for spaces
tagList.ForEach(tag => tag.Replace(" ", "_")); //replace remaining inner word spacings with _
两个 ForEach 循环都不起作用。 tagList 只是一个列表。
谢谢!
【问题讨论】:
-
请不要说他们“不工作”。请描述您预期会发生什么,以及您实际观察到什么。