From 406cec8584565918bc278adbe056490a2de84101 Mon Sep 17 00:00:00 2001 From: ahsonkhan Date: Fri, 15 Dec 2017 16:08:47 -0800 Subject: [PATCH] ReadOnlySpan GetReference returns ref instead of ref readonly --- .../shared/System/Runtime/InteropServices/MemoryMarshal.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mscorlib/shared/System/Runtime/InteropServices/MemoryMarshal.cs b/src/mscorlib/shared/System/Runtime/InteropServices/MemoryMarshal.cs index b023022df8e2..2651df53a05f 100644 --- a/src/mscorlib/shared/System/Runtime/InteropServices/MemoryMarshal.cs +++ b/src/mscorlib/shared/System/Runtime/InteropServices/MemoryMarshal.cs @@ -28,7 +28,7 @@ public static Memory AsMemory(ReadOnlyMemory readOnlyMemory) => public static ref T GetReference(Span span) => ref span._pointer.Value; - public static ref readonly T GetReference(ReadOnlySpan span) => ref span._pointer.Value; + public static ref T GetReference(ReadOnlySpan span) => ref span._pointer.Value; public static bool TryGetArray(ReadOnlyMemory readOnlyMemory, out ArraySegment arraySegment) {