Skip to content

ReadOnlySequence<T>.TryGet() returns empty result #27769

Description

@thargy

When calling ReadOnlySequence<T>.TryGet(ref position, out memory) with a position of sequence.End or sequence.GetPosition(size) the result is true and memory is an empty slice. As this effectively is not returning a segment or byte, is should probably return false.

As per this comment from @pakrym, I'm raising as a seperate issue.

Metadata

Metadata

Labels

area-System.Memorybughelp wanted[up-for-grabs] Good issue for external contributorsin-prThere is an active PR which will close this issue when it is merged

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions