Fix pragma warning restore (dotnet/coreclr#26389)
[mono-project.git] / netcore / System.Private.CoreLib / shared / System / SpanDebugView.cs
blobf79c67306ceee800fee0208c8eab0cc14f85c46e
1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
5 using System.Diagnostics;
7 namespace System
9 internal sealed class SpanDebugView<T>
11 private readonly T[] _array;
13 public SpanDebugView(Span<T> span)
15 _array = span.ToArray();
18 public SpanDebugView(ReadOnlySpan<T> span)
20 _array = span.ToArray();
23 [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
24 public T[] Items => _array;