Performs macro substitution in Csharp

  • Thread starter Thread starter L.Peter
  • Start date Start date
L

L.Peter

Dear Group,
How can I do this?
****
int i;
string cmacro = "i =3";
// How to tell c# to show 3
MessageBox.Show(cmacro);
****
how can I tell c# to treat my string as code?

TIA

L.peter
 
C# doesn't have an evaluation grammer of any sort. There are no macro
replacements. In fact there are only a few interpreted C# libraries. That last
item would be your best bet, since I'm sure at some point a company will
release a decent one. In fact, I have a decent one that I was planning for
January.

In the short term, you can maybe check out Mono. I think it has a C#
interpreter. Technically I'm not supposed to look at Mono, and I don't
so I'm not sure how good it is.
 
Dear Justin,
Thank you for your reply. What a pity. Hope Microsoft will do something to
add more useful features to C#.

Best Regards

L.Peter
 
Back
Top