开发者

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

开发者 https://www.devze.com 2023-03-10 16:28 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: How to remove el开发者_JS百科ements from an array
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

精彩评论

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

关注公众号