System.SpanTests.ReadOnlySpanTests.CtorArrayIntNegativeStart C# (CSharp) Méthode

CtorArrayIntNegativeStart() private méthode

private CtorArrayIntNegativeStart ( ) : void
Résultat void
        public static void CtorArrayIntNegativeStart()
        {
            int[] a = new int[3];
            Assert.Throws<ArgumentOutOfRangeException>(() => new ReadOnlySpan<int>(a, -1).DontBox());
        }