Прочетете на английски Редактиране

Споделяне чрез


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

Definition

Returns the position of the first occurrence of value in the ReadOnlySequence<T>.

C#
public static SequencePosition? PositionOf<T>(this in System.Buffers.ReadOnlySequence<T> source, T value) where T : IEquatable<T>;

Type Parameters

T

The type of the items in the ReadOnlySequence<T>.

Parameters

value
T

The item to find in the ReadOnlySequence<T>.

Returns

An object whose GetInteger() method returns the position of the first occurrence of value, or an object whose Nullable<SequencePosition>.HasValue property is false .

Applies to

Продукт Версии
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.0 (package-provided), 2.1