ImmutableList<T>.Find(Predicate<T>) 方法
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
搜索与指定谓词所定义的条件相匹配的元素,并返回整个不可变列表中的第一个匹配元素。
public:
virtual T Find(Predicate<T> ^ match);
public:
T Find(Predicate<T> ^ match);
C#
public T Find (Predicate<T> match);
C#
public T? Find (Predicate<T> match);
abstract member Find : Predicate<'T> -> 'T
override this.Find : Predicate<'T> -> 'T
member this.Find : Predicate<'T> -> 'T
Public Function Find (match As Predicate(Of T)) As T
- match
- Predicate<T>
委托,用于定义要搜索的元素的条件。
T
如果找到与指定谓词定义的条件匹配的第一个元素,则为该元素;否则为类型 T
的默认值。
产品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
UWP | 10.0 |