次の方法で共有


Predicate<T> Delegate

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Represents the method that defines a set of criteria and determines whether the specified object meets those criteria.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Delegate Function Predicate(Of In T) ( _
    obj As T _
) As Boolean
public delegate bool Predicate<in T>(
    T obj
)

Type Parameters

  • inT
    The type of the object to compare.

    This type parameter is contravariant. That is, you can use either the type you specified or any type that is less derived. For more information about covariance and contravariance, see 2678dc63-c7f9-4590-9ddc-0a4df684d42e.

Parameters

  • obj
    Type: T
    The object to compare against the criteria.

Return Value

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

Remarks

None of the methods in the .NET Framework for Silverlight class library have a Predicate<T> delegate as a parameter. The Predicate<T> delegate exists primarily to support the infrastructure, but you can still use it to create custom methods that use predicates.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

See Also

Reference