Click here to Skip to main content
15,904,497 members
Home / Discussions / C#
   

C#

 
GeneralRe: About password Pin
Heath Stewart24-Jun-04 5:41
protectorHeath Stewart24-Jun-04 5:41 
GeneralRe: About password Pin
wk_vigorous25-Jun-04 0:19
wk_vigorous25-Jun-04 0:19 
GeneralRe: About password Pin
Heath Stewart25-Jun-04 3:38
protectorHeath Stewart25-Jun-04 3:38 
Generalboolean expression evaluation Pin
narada10824-Jun-04 5:12
narada10824-Jun-04 5:12 
GeneralRe: boolean expression evaluation Pin
Dave Kreskowiak24-Jun-04 5:47
mveDave Kreskowiak24-Jun-04 5:47 
GeneralRe: boolean expression evaluation Pin
narada10824-Jun-04 5:52
narada10824-Jun-04 5:52 
GeneralRe: boolean expression evaluation Pin
Heath Stewart24-Jun-04 6:02
protectorHeath Stewart24-Jun-04 6:02 
GeneralRe: boolean expression evaluation Pin
Heath Stewart24-Jun-04 6:12
protectorHeath Stewart24-Jun-04 6:12 
There are a couple ways you could do this, including one way in the BCL (though not easy).

The first is to reference the Microsoft.JScript.dll assembly and use the Eval class. In JScript .NET, this would be equivalent of the eval method (also in Javascript and JScript, though those aren't compiled languages nor do they target the CLR). I believe I saw an article on this some time back on MSDN. I could be wrong, but you could try searching for it or just give it a try.

The other way is to use Reflection Emit or the CodeDOM. Basically, you create a class that contains those variables and contains a method which evaluates those variables and returns a bool.

Read Emitting Dynamic Assemblies[^] in the .NET Framework SDK for more information about Reflection Emit and Generating and Compiling Source Code Dynamically in Multiple Languages[^] for more information on CodeDOM.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: boolean expression evaluation Pin
Dave Kreskowiak24-Jun-04 8:03
mveDave Kreskowiak24-Jun-04 8:03 
GeneralRe: boolean expression evaluation Pin
Karl 200027-Jun-04 11:51
Karl 200027-Jun-04 11:51 
GeneralRe: boolean expression evaluation Pin
Anonymous27-Jun-04 20:49
Anonymous27-Jun-04 20:49 
GeneralC# Open Dialog Box Pin
HyVong24-Jun-04 3:21
HyVong24-Jun-04 3:21 
GeneralRe: C# Open Dialog Box Pin
Heath Stewart24-Jun-04 5:09
protectorHeath Stewart24-Jun-04 5:09 
GeneralRe: C# Open Dialog Box Pin
HyVong24-Jun-04 5:18
HyVong24-Jun-04 5:18 
GeneralRe: C# Open Dialog Box Pin
Heath Stewart24-Jun-04 5:45
protectorHeath Stewart24-Jun-04 5:45 
GeneralRe: C# Open Dialog Box Pin
HyVong24-Jun-04 5:49
HyVong24-Jun-04 5:49 
GeneralRe: C# Open Dialog Box Pin
HyVong25-Jun-04 3:25
HyVong25-Jun-04 3:25 
Generalquery builer Pin
Member 114126624-Jun-04 2:35
Member 114126624-Jun-04 2:35 
GeneralMS Project 2003 Pin
frankvgb24-Jun-04 1:41
frankvgb24-Jun-04 1:41 
GeneralRe: MS Project 2003 Pin
Heath Stewart24-Jun-04 6:23
protectorHeath Stewart24-Jun-04 6:23 
Questionserver name? Pin
quocbao24-Jun-04 1:19
quocbao24-Jun-04 1:19 
AnswerRe: server name? Pin
Heath Stewart24-Jun-04 6:37
protectorHeath Stewart24-Jun-04 6:37 
Questionserver name? Pin
quocbao24-Jun-04 1:18
quocbao24-Jun-04 1:18 
QuestionHow to write a Async UDP socket code? Pin
fu023-Jun-04 20:53
fu023-Jun-04 20:53 
AnswerRe: How to write a Async UDP socket code? Pin
Heath Stewart24-Jun-04 6:41
protectorHeath Stewart24-Jun-04 6:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.