LINQ indexOf a particular entry

后端 未结 4 1059
不思量自难忘°
不思量自难忘° 2021-01-01 11:28

I have an MVC3 C#.Net web app. I have the below string array.

    public static string[] HeaderNamesWbs = new[]
                                       {
            


        
4条回答
  •  被撕碎了的回忆
    2021-01-01 12:00

    If you want to search List with a function rather than specifying an item value, you can use List.FindIndex(Predicate match).

    See https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1.findindex?view=netframework-4.8

提交回复
热议问题