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

CtorPointerInt() private method

private CtorPointerInt ( ) : void
return void
        public static void CtorPointerInt()
        {
            unsafe
            {
                int[] a = { 90, 91, 92 };
                fixed (int *pa = a)
                {
                    ReadOnlySpan<int> span = new ReadOnlySpan<int>(pa, 3);
                    span.Validate<int>(90, 91, 92);
                    Assert.True(Unsafe.AreSame<int>(ref Unsafe.AsRef<int>(pa), ref span.DangerousGetPinnableReference()));
                }
            }
        }