Contract.Exists 메서드

정의

오버로드

Name Description
Exists(Int32, Int32, Predicate<Int32>)

정수 범위 내의 정수에 대해 지정된 테스트가 true인지 여부를 확인합니다.

Exists<T>(IEnumerable<T>, Predicate<T>)

요소 컬렉션 내의 요소가 함수 내에 있는지 여부를 확인합니다.

Exists(Int32, Int32, Predicate<Int32>)

Source:
Contracts.cs
Source:
Contracts.cs
Source:
Contracts.cs
Source:
Contracts.cs
Source:
Contracts.cs

정수 범위 내의 정수에 대해 지정된 테스트가 true인지 여부를 확인합니다.

public:
 static bool Exists(int fromInclusive, int toExclusive, Predicate<int> ^ predicate);
public static bool Exists(int fromInclusive, int toExclusive, Predicate<int> predicate);
static member Exists : int * int * Predicate<int> -> bool
Public Shared Function Exists (fromInclusive As Integer, toExclusive As Integer, predicate As Predicate(Of Integer)) As Boolean

매개 변수

fromInclusive
Int32

전달할 첫 번째 정수입니다 predicate.

toExclusive
Int32

전달할 predicate마지막 정수보다 1개 이상

predicate
Predicate<Int32>

지정된 범위의 정수 값을 계산할 함수입니다.

반품

에서 - 1로 시작하는 정수에 대한 반환 이면 입니다.

예외

predicatenull입니다.

toExclusive 가 .보다 fromInclusive작습니다.

설명

toExclusive 매개 변수는 0부터 시작하는 정수 범위의 길이를 쉽게 사용할 수 있도록 마지막 정수보다 1개 이상입니다. 예를 들어 정수 0~4의 경우 5로 설정됩니다.

추가 정보

적용 대상

Exists<T>(IEnumerable<T>, Predicate<T>)

Source:
Contracts.cs
Source:
Contracts.cs
Source:
Contracts.cs
Source:
Contracts.cs
Source:
Contracts.cs

요소 컬렉션 내의 요소가 함수 내에 있는지 여부를 확인합니다.

public:
generic <typename T>
 static bool Exists(System::Collections::Generic::IEnumerable<T> ^ collection, Predicate<T> ^ predicate);
public static bool Exists<T>(System.Collections.Generic.IEnumerable<T> collection, Predicate<T> predicate);
static member Exists : seq<'T> * Predicate<'T> -> bool
Public Shared Function Exists(Of T) (collection As IEnumerable(Of T), predicate As Predicate(Of T)) As Boolean

형식 매개 변수

T

에 포함된 collection형식입니다.

매개 변수

collection
IEnumerable<T>

전달할 T형식 predicate 의 요소를 그릴 컬렉션입니다.

predicate
Predicate<T>

에서 요소를 collection평가할 함수입니다.

반품

true에 있는 형식 predicate 의 요소에 대해 반환 true 하는 경우에만 T 입니다collection.

예외

collection 또는 predicate .입니다 null.

추가 정보

적용 대상