MemoryStream.TryConsume C# (CSharp) Method

TryConsume() public method

public TryConsume ( &item ) : bool
return bool
    public bool TryConsume([MaybeNullWhen(false)] out T item)
    {
        if (!this.TryPeek(out item)) return false;
        ++this.Index;
        return true;
    }