C#基礎C#中的eval()函數(shù)

字號:

可以這樣說,絕大多數(shù)的大型網(wǎng)站都會用到eval()函數(shù),雖然一直在用,但其具體含義及使用還真沒特別去注意過,搜索了下也沒有什么明確的解釋。
    翻譯過來的中文釋義大體如下:
    C# eval ()函數(shù),是一個用來求值的解析表達式,支持布爾型(Boolean),二進制方式,算法,一元,所屬,
    成員(例如:object.property 對象屬性),索引值(數(shù)組索引);條件函數(shù),也支持變量賦值。
    考試大提示:其有點在于:
    無需運行時編譯;
    無需使用JScript.NET;
    無需使用數(shù)據(jù)表。
    英文如下:
    C# eval function
    parse expression and evaluate it. Supports Boolean, Bitwise, Arithmetic, Unary, Paren, Member (such as object.property ), Indexer (such as array[index]) and ConditionalIf(?:), also supports Variable assign.
    you can use it like evaluate one statement C# source code.
    not use runtime Compiler.
    not use JScript.NET.
    not use DataTable