C
C
Chipu2018-04-24 18:52:02
C++ / C#
Chipu, 2018-04-24 18:52:02

C# input string was malformed, how can I fix this?

5adf52925afb4815279745.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Yudakov, 2018-04-24
@Chipu

When the "x" coordinate exceeds 9, the string will be:
"10:4"
Accordingly, the character at index [2] will be ':', not a number.
Therefore, Convert.ToInt32 throws a FormatException.
I recommend doing what Roman advises .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question