System.ThrowHelper.ThrowArrayTypeMismatchException_ArrayTypeMustBeExactMatch C# (CSharp) Méthode

ThrowArrayTypeMismatchException_ArrayTypeMustBeExactMatch() static private méthode

static private ThrowArrayTypeMismatchException_ArrayTypeMustBeExactMatch ( Type type ) : void
type Type
Résultat void
        internal static void ThrowArrayTypeMismatchException_ArrayTypeMustBeExactMatch(Type type) { throw CreateArrayTypeMismatchException_ArrayTypeMustBeExactMatch(type); }
        [MethodImpl(MethodImplOptions.NoInlining)]

Usage Example

Exemple #1
0
        public Span(T[] array)
        {
            if (array == null)
            {
                ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
            }
            if (default(T) == null && array.GetType() != typeof(T[]))
            {
                ThrowHelper.ThrowArrayTypeMismatchException_ArrayTypeMustBeExactMatch(typeof(T));
            }

            _length     = array.Length;
            _pinnable   = Unsafe.As <Pinnable <T> >(array);
            _byteOffset = SpanHelpers.PerTypeValues <T> .ArrayAdjustment;
        }
All Usage Examples Of System.ThrowHelper::ThrowArrayTypeMismatchException_ArrayTypeMustBeExactMatch