By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,011 Members | 1,000 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,011 IT Pros & Developers. It's quick & easy.

Macro Substitution

P: n/a
Hello, there's another languages that can do a macro substitution, how can I
do this in Csharp.

This is an example of what I want to do

Dataset ds = new Dataset;

string a = "ds";

DataSet ds2 = &a;

This is a little more complex

int i = 6;
int j = 5;

string a = " i == j";

bool b = &a; //b will be false

TIA

Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
You cannot. Macro substitution like that is mostly a feature of
interpreted languages (such as dBase), and implementing it in compiled
langauge (such as C#) is usually a nightmare, so most avoid it.

It basically requires the program to recompile itself on the fly; or switch
into interpreted mode. Which would require the program to drag along with
it, either a compiler or interpreter
"Rodolfo" <ru***@hotmail.com> wrote in message
news:eZ**************@TK2MSFTNGP12.phx.gbl...
Hello, there's another languages that can do a macro substitution, how can I do this in Csharp.

This is an example of what I want to do

Dataset ds = new Dataset;

string a = "ds";

DataSet ds2 = &a;

This is a little more complex

int i = 6;
int j = 5;

string a = " i == j";

bool b = &a; //b will be false

TIA

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.