>Is there are way you can execute a marco-substitution in c#, like you can in VFP?
>In VFP it's something like this:
>
>use sometable
>lcCmd = "BROWSE"
>&lcCmd
>
>
>Is there a way you can do something like it in c#?
>
>Thanks.
Sandy, in some instances, you "can", though it's more complicated and the learning curve is considerable. Here are two items to consider:
First. .NET has what's called reflection.
I wrote an article for CODE magazine years ago on moving from VFP to .NET. And even though some of the information is a bit dated, tip #3 in the article will give you some exposure to reflection (and even though Bonnie Berent doesn't come up to this site much, she was very helpful when I was trying to learn reflection over a decade ago)
http://www.codemag.com/Article/0703092Second, .NET has what's called generics. Generics can help in certain instances where you might think you need macro-substitution/expansion. Sometimes you might have multiple blocks of code that differ only by the type/data type. Generics can help. Again, my CODE article
Again, there's no simple solution and it will require some studying. But in the end it can be worth it.
Update: I see Al gave a suggestion on compiler construction that might also help.