eval() in c# | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 6

eval() in c#

hello. how i can do something like [ eval(); in js or php ] i will not make a text editor , but i need it in code only ! like : š¢š§š­ š± = š¬šžšœšØš§š ; š¬š­š«š¢š§š  šŸš¢š«š¬š­ = "š”šžš„š„šØ š¢'š¦ šØš§šž"; š¬š­š«š¢š§š  š¬šžšœšØš§š = "š”šžš„š„šØ š¢'š¦ š­š°šØ"; š¬š­š«š¢š§š  š­š”š¢š«š = "š”šžš„š„šØ š¢'š¦ š­š”š«šžšž"; š¬š­š«š¢š§š  šŸšØš®š«š­š” = "š”šžš„š„šØ š¢'š¦ šŸšØš®š«"; šŸš®š§šœ(š²); { šžšÆššš„(" š± = " + š²); } func(x); šœšØš§š¬šØš„šž.š°š«š¢š­šž(x); // šØš®š­š©š®š­ : š”šžš„š„šØ š¢'š¦ š­š°šØ ---------------------------- i need code like this because i have more than 50 if else and switch blocks and more. thanks =) i try the idea here : https://code.sololearn.com/WbiEHdk01g4l/?ref=app

31st Jul 2018, 12:29 PM
Yousef Eabitan
Yousef Eabitan - avatar
2 Respostas
+ 2
It can be achieved using System.Data.Compute() method. However I'm not sure if it can do string operations. You can refer the Execute function in the following code to get an idea on how to use it (last method in file). https://code.sololearn.com/cUjWf1uegwh6/?ref=app
31st Jul 2018, 5:31 PM
Rusty.Metal
+ 3
Rusty.Metal Thank You , Yes I Need Something Like This , But I Will Try If This will work with me ā¤ā¤
1st Aug 2018, 1:12 PM
Yousef Eabitan
Yousef Eabitan - avatar