I am only 14 years old and have just started using C#. I got a book of it for Christmas from my father.
Here is my question... In C# is there some sort of way to mathmatically evaluate a string? In python I have done this simplily by using the eval() function, but I wasn't sure if its the same case for C#.
Please help, and thank you very much!
2 replies to this topic
#1
Posted 25 December 2010 - 08:13 PM
|
|
|
#2
Posted 27 December 2010 - 12:20 AM
_Khalil_ said:
I am only 14 years old and have just started using C#. I got a book of it for Christmas from my father.
Here is my question... In C# is there some sort of way to mathmatically evaluate a string? In python I have done this simplily by using the eval() function, but I wasn't sure if its the same case for C#.
Please help, and thank you very much!
Here is my question... In C# is there some sort of way to mathmatically evaluate a string? In python I have done this simplily by using the eval() function, but I wasn't sure if its the same case for C#.
Please help, and thank you very much!
C# Does not have a built in equivalent to eval() but you can use a library that will provide this functionality for you
see: NCalc - Mathematical Expressions Evaluator for .NET
In the future you may also want to have a more descriptive thread title.
#3
Posted 27 December 2010 - 02:50 PM
thank you
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









