Good day.
I need to know exactly which char character is used to separate the string in order to further use this information. Of course, when I enter the string "2 + 3" into the console, I understand that the '+' symbol will be used to split the line into two monomials, but how to get this information from the code itself, to save it and use it in the future?
Char[] operators = { '+', '-', '*', '/' }; String[] monomials = term.Split(operators); Input operands = new Input(); int monomialsLenght = monomials.Length; switch (monomialsLenght) { case 2: { operands.Operand1 = monomials[0]; operands.operand2 = monomials[1]; if (monomials[0] == "" || monomials[1] == "") { ErrReport(); GetTerm(); } break; Thank you.