您的位置:首页 > 其它

tempList.Count(m => m == "sss") 返回符合要求的对象数量

2017-08-08 17:52 253 查看
private void Start()

    {

       List<string> tempList = new List<string>() { "aa","sss", "sss" };

       int count = tempList.Count(m => m == "sss");

       Debug.Log(count); // 2

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐