Jump to content

Very simple question...

- - - - -

  • Please log in to reply
2 replies to this topic

#1
_Khalil_

_Khalil_

    Newbie

  • Members
  • Pip
  • 9 posts
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
Generic

Generic

    Newbie

  • Members
  • PipPip
  • 26 posts

_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!

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
_Khalil_

_Khalil_

    Newbie

  • Members
  • Pip
  • 9 posts
thank you




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users