468,771 Members | 1,930 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,771 developers. It's quick & easy.

Macro Substitution

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
1 4826
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.

Similar topics

6 posts views Thread by Raghuveer Pallikonda | last post: by
8 posts views Thread by Siemel Naran | last post: by
1 post views Thread by me | last post: by
7 posts views Thread by Newbie_sw2003 | last post: by
14 posts views Thread by Malcolm | last post: by
4 posts views Thread by Don | last post: by
3 posts views Thread by XHengDF | last post: by
7 posts views Thread by MtiPaulo | last post: by
37 posts views Thread by junky_fellow | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.