Answer the question
In order to leave comments, you need to log in
Executing a string as code?
We need to make a calculator that calculates mathematical expressions in many steps (without cos() tan(), etc.). The idea is this: the user enters an example in Gui written in WPF, and C# reads it and displays the answer. Let's say the user enters 2+2*2 and you want to display the answer, that is, the number 6.
How in C# to execute the data of a variable of type string as code? If not, then how to execute list data with string elements as code, if each number or action is a separate list element?
If the user can't enter his code in C# when the program is running, then how can you write a calculator?
Answer the question
In order to leave comments, you need to log in
https://ru.wikipedia.org/wiki/Sorting_algorithm...
https://ru.wikipedia.org/wiki/Reverse_Polish_Notation
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question