System.SpanTests.SpanTests.EqualityBasedOnLocationNotConstructor C# (CSharp) Method

EqualityBasedOnLocationNotConstructor() private method

private EqualityBasedOnLocationNotConstructor ( ) : void
return void
        public static void EqualityBasedOnLocationNotConstructor()
        {
            unsafe
            {
                int[] a = { 91, 92, 93, 94, 95 };
                fixed (int* pa = a)
                {
                    Span<int> left = new Span<int>(a, 2, 3);
                    Span<int> right = new Span<int>(pa + 2, 3);

                    Assert.True(left == right);
                    Assert.True(!(left != right));
                }
            }
        }