小编ith*_*que的帖子

在List <string>中使用StartsWith和Contains?

我有一份清单.

可能的成员(x123,y123,z123,a123,b123,c123).// 123是示例此"mylist"可能包含以x开头的成员,或者可能不包含.y,z,a,b,c也是如此.

If contains a member starts with x:
//Formula Contains X

If Not Contains a member starts with x:
//Formula Not Contains X

//same as all of x,y,z,a,b,c. But unlike a foreach, I must place the formulas at checking time, not after.
Run Code Online (Sandbox Code Playgroud)

我怎样才能做到这一点?

c# list

4
推荐指数
2
解决办法
1万
查看次数

标签 统计

c# ×1

list ×1