ImmutableArrayExtensions.Single 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
Single<T>(ImmutableArray<T>) |
시퀀스의 유일한 요소를 반환하고, 시퀀스에 요소가 정확히 하나 들어 있지 않으면 예외를 throw합니다. |
Single<T>(ImmutableArray<T>, Func<T,Boolean>) |
시퀀스에서 지정된 조건에 맞는 유일한 요소를 반환하고, 이러한 요소가 둘 이상 있으면 예외를 throw합니다. |
Single<T>(ImmutableArray<T>)
시퀀스의 유일한 요소를 반환하고, 시퀀스에 요소가 정확히 하나 들어 있지 않으면 예외를 throw합니다.
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static T Single(System::Collections::Immutable::ImmutableArray<T> immutableArray);
public static T Single<T> (this System.Collections.Immutable.ImmutableArray<T> immutableArray);
static member Single : System.Collections.Immutable.ImmutableArray<'T> -> 'T
<Extension()>
Public Function Single(Of T) (immutableArray As ImmutableArray(Of T)) As T
형식 매개 변수
- T
컬렉션에 의해 포함되는 요소의 형식입니다.
매개 변수
- immutableArray
- ImmutableArray<T>
요소를 검색할 배열입니다.
반환
- T
시퀀스의 요소입니다.
적용 대상
Single<T>(ImmutableArray<T>, Func<T,Boolean>)
시퀀스에서 지정된 조건에 맞는 유일한 요소를 반환하고, 이러한 요소가 둘 이상 있으면 예외를 throw합니다.
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static T Single(System::Collections::Immutable::ImmutableArray<T> immutableArray, Func<T, bool> ^ predicate);
public static T Single<T> (this System.Collections.Immutable.ImmutableArray<T> immutableArray, Func<T,bool> predicate);
static member Single : System.Collections.Immutable.ImmutableArray<'T> * Func<'T, bool> -> 'T
<Extension()>
Public Function Single(Of T) (immutableArray As ImmutableArray(Of T), predicate As Func(Of T, Boolean)) As T
형식 매개 변수
- T
컬렉션에 의해 포함되는 요소의 형식입니다.
매개 변수
- immutableArray
- ImmutableArray<T>
단일 요소를 반환할 변경할 수 없는 배열입니다.
반환
- T
Boolean를 반환합니다.