При выполнении кода вылезает следующее исключение: System.FormatException: "Input string was not in a correct format

                     if (operSum[3] == '1')
                    {
                        int indexOperSum = 5;
                        string stringIndex = "";
                        while (TryParseCommand(operSum, out _, out _))
                    {
                            stringIndex += operSum[indexOperSum];
                            indexOperSum++;
                            if (operSum[indexOperSum].ToString() == null) break;
                     }
                     int index = int.Parse(stringIndex); 
                     if (isFirstAdd) firstAdd = index;
                     else SecondAdd = index;                    

При выполнении кода вылезает следующее исключение: System.FormatException: "Input string was not in a correct format." в строке int index = int.Parse(stringIndex);

Примечание: функция TryParseCommand работает нормально, ее лучше не трогать, от греха подальше


Ответы (0 шт):