OK, what I am trying to is this:
say I have this:
////////////////////////////////////
class foo()
{
string nice = "very nice";
string johny = "class chocolate(){ MessageBox.Show(nice); }";
}
///////////////////////////////////
Now I want the entire string contents (class chocolate(){ MessageBox.Show(nice); }) - to become a new code...like this:
////////////////////////////////////////////////////////////////////////
class foo()
{
string nice = "very nice";
string johny = "class chocolate(){ MessageBox.Show(nice); }";
}
class chocolate(){ MessageBox.Show(nice); }
/////////////////////////////////////////////////////////////////////////
How can I achieve this?
10x alot!
1 reply to this topic
#1
Posted 24 January 2011 - 07:07 AM
|
|
|
#2
Posted 24 January 2011 - 02:30 PM
With a little Googling.
.net - c# create an instance of a class from a string - Stack Overflow
Activator.CreateInstance Method (System)
EDIT: Also, please encase your code within code tags, like so: [CODE*]code goes here[/CODE*] just remove the '*' symbol.
Hope this helps. ~ Committed. :)
.net - c# create an instance of a class from a string - Stack Overflow
Activator.CreateInstance Method (System)
EDIT: Also, please encase your code within code tags, like so: [CODE*]code goes here[/CODE*] just remove the '*' symbol.
Hope this helps. ~ Committed. :)
A man can be defined by what he does when no one is looking.
Science is only an educated theory, which we cannot disprove.
Science is only an educated theory, which we cannot disprove.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









