V
V
Vimake2014-02-03 15:47:20
C++ / C#
Vimake, 2014-02-03 15:47:20

Why does the error "Unhandled exception of type 'System.ArgumentOutOfRangeException' in mscorlib.dll" occur?

Here is what is written in the error:

Необработанное исключение типа "System.ArgumentOutOfRangeException" в mscorlib.dll

Дополнительные сведения: Индекс за пределами диапазона. Индекс должен быть положительным числом, а его размер не должен превышать размер коллекции.

The error is on this line
var max = Convert.ToInt32(max_user, 16);

Answer the question

In order to leave comments, you need to log in

3 answer(s)
C
CAMOKPYT, 2014-02-03
@CAMOKPYT

ArgumentOutOfRangeException - value is String.Empty
Most likely max_user is empty

A
Alexander, 2014-02-03
@Papagatto

Or too large a number, does not fit into Int32

N
Nikolai Turnaviotov, 2014-02-03
@foxmuldercp

most likely because arrays are usually counted from the zero position, so the border will not be 16 but 15. i.e. the fact is the value minus one

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question