Seeing that many people often ask this question: How to be string "126 (256 - 2 ^ 4)", or how to judge the results of "115> 56 || 14 <45", etc., check it in MSDN Write an Eval class / ************************************************** *********************** File Name: Eval.cs ** Copyright (c) 1999 -2003 ** Created: phoenix ** Create Date: ** Modify: ** Modification Date: ** Description: Get the logic meaning of the string ** version: 1.0 ********************** ************************************************************** / using system.codedom System.CodeDom.Compiler; using Microsoft.CSharp; using System.Reflection; public class Eval {static object GetValue (string value) {string codeSnippet = "using System;" "/ r / n" "namespace CzG {" "/ r / n" "public class eval" "/ r / n" {" " / r / n " " public eval () {} " " / r / n " " public Object GetValue () " " / r / n " " {" " / r / n " "Return" Value "; " / R / N " "} " " / r / n "}}"