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

ThrowArgumentOutOfRangeException() static private méthode

static private ThrowArgumentOutOfRangeException ( ExceptionArgument argument ) : void
argument ExceptionArgument
Résultat void
        internal static void ThrowArgumentOutOfRangeException(ExceptionArgument argument) { throw CreateArgumentOutOfRangeException(argument); }
        [MethodImpl(MethodImplOptions.NoInlining)]

Usage Example

Exemple #1
0
        // Converts an array of bytes into a char.
        public static char ToChar(byte[] value, int startIndex)
        {
            if (value == null)
            {
                ThrowHelper.ThrowArgumentNullException(ExceptionArgument.value);
            }

            if ((uint)startIndex >= value.Length)
            {
                ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.startIndex, ExceptionResource.ArgumentOutOfRange_Index);
            }

            if (startIndex > value.Length - 2)
            {
                ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_ArrayPlusOffTooSmall);
            }
            Contract.EndContractBlock();

            return((char)ToInt16(value, startIndex));
        }
All Usage Examples Of System.ThrowHelper::ThrowArgumentOutOfRangeException