Artificer,
No, there isn't. Granted, you could dynamically compile the code and
load it, but that's not even worth it.
What you should do is define an interface that has methods on it which
have a defined set of inputs and outputs, and then execute different
implementations of it depending on your needs.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Artificer" <el*************@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Allow me to explain my question. I would like create a function in
which one of it sentences will be decided at run time.
Something like
String MySentence= "int x=0;"
Public void MyFunction (String MyCode)
{
Execute (MyCode);
}
Here "Execute" is a fictitious reserved word that will read the string
and execute the code inside it.
There is something like "Execute" in C# ?