Possible duplicates:equivalent to C # equivalent?How can I evaluate a C # expression dynamically?
How can I evaluate valid C # code and get results inside a compiled program (dynamically)? I know this is not very clear, I will try to show this using a piece of code:
Visual C # 2010.
double x = 3.0;//this is function argument, we'll take 3 string str = "Math.Pow(x,2)+2*x+4";//value with written function in C#,equals: x^2+2x+4 double y = eval(str); /* this is the idea! something like JS.I want to make string parsed into parameter,i.e y=19 - this is what double y should became after eval(str) */
Hope you have an idea.
Thank.
No, LINQ will not do this for you.
CSharpCodeProvider, , , , .
Source: https://habr.com/ru/post/1774463/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1774458/what-will-be-the-best-embedded-database-to-be-used-with-a-small-java-desktop-application&usg=ALkJrhgDr94-NLEEcrfm9De0xBsEjbXDHAHow to redirect non-zend link from zend app - redirectSimple wostream logging class (with custom thread manipulators) - c ++Problem with inserting records from multiple computers in one database at the same time in SQL Server 2005 - sql-serverEF4 linq NullReferenceException on non-zero object - c #Firebird vs HSQLDB in Java - javaHow to check SQLite streaming mode? - sqliteDistinguish ABAP between different SAP clients (Mandanten) - sapModeling multiple low-bandwidth network interfaces on Linux - linuxhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1774468/can-changesets-in-mercurial-repositories-be-merged-chronologically&usg=ALkJrhivSq21wgJwor7zeDGUmC0phVS5PAAll Articles