I want to find the index of an element in a list maching a certain predicate, is there a better way to do it than:
var index = list.IndexOf(list.Find(predicate)开发者_运维技巧);
?
Are you looking for List<T>.FindIndex(predicate)
?
I want to find the index of an element in a list maching a certain predicate, is there a better way to do it than:
var index = list.IndexOf(list.Find(predicate)开发者_运维技巧);
?
Are you looking for List<T>.FindIndex(predicate)
?
精彩评论