小编Vin*_*oth的帖子

如何使用c#条件在条件内使用c#

值来自xml,用户只声明要执行的条件.

string condition ="25<10";
Run Code Online (Sandbox Code Playgroud)

现在,我想在if条件下使用它:

if(condition)
{
    //my condition
}
Run Code Online (Sandbox Code Playgroud)

我收到了这个错误

Cannot implicitly convert type string to bool
Run Code Online (Sandbox Code Playgroud)

谁能告诉我怎么做?

c# asp.net

5
推荐指数
1
解决办法
1880
查看次数

标签 统计

asp.net ×1

c# ×1