System.Predicate<T> Delegate

public delegate bool Predicate<T>(T obj);

Base Types

Object
  Delegate
    Predicate<T>

This type implements ICloneable.

Assembly

mscorlib

Library

BCL

Summary

Represents the method that defines a Boolean query on an object.

Parameters

obj
The object to compare against the Boolean query defined within the method represented by this delegate.

Return Value

true if obj meets the criteria defined within the method represented by this delegate; otherwise, false .

Description

Predicate methods are expected to not throw exceptions. If they do throw exceptions, other methods that use that delegate might exhibit unspecified behavior. It is also intended that predicate methods not produce side-effects; however, such methods need not be thread safe.

[Note: This delegate is used by several methods in Array, and in System.Collections.Generic.List<T> to search for elements in the collection.

]

See Also

System Namespace