tags:

views:

12

answers:

1

I need to port an old Clipper app to vb.net. It relies heavily on user-written macros and indeed would be almost impossible to create without them. As VB is interpreted, I am sure it must be possible to implement code that the user has entered, but I have no idea how to do so!

For example, I might have a text field txtMacro, into which my user enters "iif(mid(txtA,2,3) = "ABC", "alphabet", "no alphabet")". I would like to have code in my app like this:

strResult = @txtMacro

where @ is some method of implementing the code in txtMacro.

A: 

Try using System.CodeDom namespace.System.CodeDom Namespace

Anuraj
Wow! Never come across this before - CodeSnippetCompileUnit looks like it may do the job for me. (Mind you, its a lot more faff than my old Clipper @ symbol!)
SM