From dbc92a9aef3dd25fb25b70be22b0e59897acb9f0 Mon Sep 17 00:00:00 2001 From: wrenge Date: Wed, 13 Nov 2024 11:54:10 +0300 Subject: [PATCH] RcRentedArray AsSpan --- src/DotRecast.Core/Buffers/RcRentedArray.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/DotRecast.Core/Buffers/RcRentedArray.cs b/src/DotRecast.Core/Buffers/RcRentedArray.cs index 68f12c7..e7809f6 100644 --- a/src/DotRecast.Core/Buffers/RcRentedArray.cs +++ b/src/DotRecast.Core/Buffers/RcRentedArray.cs @@ -43,6 +43,11 @@ namespace DotRecast.Core.Buffers return _array; } + public Span AsSpan() + { + return new Span(_array, 0, Length); + } + public void Dispose() {