+ 1

total sum c#

I want to sum number like this Ex: 2+3 =5 But i want to use one textBox , one Button and one richTextBox; How to write code by c#

27th Sep 2017, 1:17 PM
lee ratana
3 Réponses
+ 9
https://code.sololearn.com/cDfv9X32nXE6/?ref=app Just check my code. If I recall, I simply made use of .NETs DataTable's compute method. It allows calculating of strings. Just beware that some symbols dont exists/work with the method. So you have to do your own conversion and such before you call that method.
27th Sep 2017, 1:38 PM
Wen Qin
Wen Qin - avatar
+ 3
Does string Input = "1 + 1"; string value = new DataTable().Compute(Input, null).ToString(); Look difficult to understand now? Just google ".NET DataTable.Compute method" and click on that documentation.
28th Sep 2017, 10:01 PM
Wen Qin
Wen Qin - avatar
0
Could you show easy than this ? It’s difficult to understand
27th Sep 2017, 3:15 PM
lee ratana