System.SpanTests.ReadOnlySpanTests.SliceIntIntUpToEnd C# (CSharp) Method

SliceIntIntUpToEnd() private method

private SliceIntIntUpToEnd ( ) : void
return void
        public static void SliceIntIntUpToEnd()
        {
            int[] a = { 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 };
            ReadOnlySpan<int> span = new ReadOnlySpan<int>(a).Slice(4, 6);
            Assert.Equal(6, span.Length);
            Assert.True(Unsafe.AreSame<int>(ref a[4], ref span.DangerousGetPinnableReference()));
        }