I
I
issHarlequin2017-05-06 23:01:48
OOP
issHarlequin, 2017-05-06 23:01:48

Is there a way in C# to embed data given to a program by input?

Good afternoon, tell me please - maybe in C # there is some way to embed what the user enters into the program code? I know this sounds ambiguous, so here's a rough example of what I mean:

string inputcons = console.readline();
Function(newclass.'inputcons');

If there is a way, please explain the syntax (or give a link) and pitfalls (in JS, as far as I know, something like this exists, but with big jambs).
Thanks in advance and sorry for what may be a stupid question.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Gavrilenko, 2017-05-07
@issHarlequin

Dynamic Expresso
Reflection.Emit
CSharpCodeProvider

A
Alexei Kochetkov, 2017-05-11
@AngelOfSnow

If I correctly understood the essence of the issue, then such things are solved in a more beautiful way, such as embedding a scripting language into a program (for example, Lua):
https://habrahabr.ru/post/197262/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question