BuffersExtensions.PositionOf(ReadOnlySequence<T>, T) BuffersExtensions.PositionOf(ReadOnlySequence<T>, T) BuffersExtensions.PositionOf(ReadOnlySequence<T>, T) BuffersExtensions.PositionOf(ReadOnlySequence<T>, T) Method

Определение

Возвращает позицию первого вхождения item в ReadOnlySequence<T>.Returns the position of the first occurrence of item in the ReadOnlySequence<T>.

public:
generic <typename T>
 where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
 static Nullable<SequencePosition> PositionOf(System::Buffers::ReadOnlySequence<T> % source, T value);
public static Nullable<SequencePosition> PositionOf<T> (this ref System.Buffers.ReadOnlySequence<T> source, T value) where T : IEquatable<T>;
static member PositionOf :  * 'T -> Nullable<SequencePosition> (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function PositionOf(Of T As IEquatable(Of T)) (ByRef source As ReadOnlySequence(Of T), value As T) As Nullable(Of SequencePosition)

Параметры типа

T

Тип элементов в ReadOnlySequence<T>.The type of the items in the ReadOnlySequence<T>.

Параметры

value
T T T T

Элемент, который требуется найти в ReadOnlySequence<T>.The item to find in the ReadOnlySequence<T>.

Возвраты

Объект, чей метод GetInteger() возвращает позицию первого вхождения item, или объект, чье свойство Nullable<SequencePosition>.HasValue имеет значение false.An object whose GetInteger() method returns the position of the first occurrence of item, or an object whose Nullable<SequencePosition>.HasValue property is false .

Применяется к