开发者

C# remove elements in list starting with # [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

How to remove el开发者_JS百科ements from an array

I have an List with a bunch of data in it. Some of the lines start with a #. I want to remove those lines.

How...?


assuming its a string List

myList.RemoveAll(x => x.BeginsWith("#"));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜