在aspnet中使用C#检查多个条件

在aspnet中使用C#检查多个条件,c#,mysql,sql,sql-update,C#,Mysql,Sql,Sql Update,在MySQL表中,我记住了这些值: +---+-------+------+ | A | B | C | +---+-------+------+ | 0 | 16,11 | 3,08 | +---+-------+------+ 1 row in set 我需要在aspnet中使用C#检查此条件: if (A < 0.1 && B > 1 && (C >= 1 && C <= 4)) 编辑#02 您似乎想

在MySQL表中,我记住了这些值:

+---+-------+------+
| A | B     | C    |
+---+-------+------+
| 0 | 16,11 | 3,08 |
+---+-------+------+
1 row in set
我需要在aspnet中使用C#检查此条件:

if (A < 0.1 && B > 1 && (C >= 1 && C <= 4))
编辑#02


您似乎想要一个简单的
更新
查询:

update mytable
set d = 1
where a < 0.1 and b > 1 and c >= 1 and c <= 4

您似乎需要一个简单的
更新
查询:

update mytable
set d = 1
where a < 0.1 and b > 1 and c >= 1 and c <= 4

你的情况是真实的,应该正常工作


您确定A、B、C值吗?

您的条件是正确的,应该可以正常工作


您确定A、B、C值吗?

我希望此代码能帮助您:-

Double[] Aarr= A.Split(',');
Double[] Barr= B.Split(',');
Double[] Carr = C.Split(',');

long ACount = Aarr.Where(x => x < 0.1).Count();
long BCount = Barr.Where(x => x > 1).Count();
long CCount = Carr.Where(x => x >= 1 && x <= 4).Count();

if((ACount == 1) && (BCount == 1) && (CCount == 1)
{
    //Your Code
}
Double[]Aarr=A.Split(',');
双[]巴尔=B.分裂(',');
双[]卡尔=C.分裂(',');
long ACount=Aarr.Where(x=>x<0.1).Count();
long BCount=Barr.Where(x=>x>1.Count();

long CCount=Carr.Where(x=>x>=1&&x我希望这段代码能帮助您:-

Double[] Aarr= A.Split(',');
Double[] Barr= B.Split(',');
Double[] Carr = C.Split(',');

long ACount = Aarr.Where(x => x < 0.1).Count();
long BCount = Barr.Where(x => x > 1).Count();
long CCount = Carr.Where(x => x >= 1 && x <= 4).Count();

if((ACount == 1) && (BCount == 1) && (CCount == 1)
{
    //Your Code
}
Double[]Aarr=A.Split(',');
双[]巴尔=B.分裂(',');
双[]卡尔=C.分裂(',');
long ACount=Aarr.Where(x=>x<0.1).Count();
long BCount=Barr.Where(x=>x>1.Count();

long CCount=Carr.Where(x=>x>=1&&x感谢您的回复,请参阅我第一个问题中的编辑01。感谢您的回复,请参阅我第一个问题中的编辑01。您的状况”(A<0.1&&B>1&&(C>=1&&C@Golia在数据库B列和C列中包含多个值,无法将其转换为双精度。请参阅我的answer@NitikaChopra谢谢回复,请参见我第一个问题中的编辑#02,拆分方法报告error@Golia…u应转换为字符串convert.ToString(dt2.Rows[0][“A”]).Split(“,”);您可以在您的条件下尝试此选项”(A<0.1&&B>1&&(C>=1&&C@Golia在数据库B列和C列中包含多个值,无法将其转换为双精度。请参阅我的answer@NitikaChopra谢谢回复,请参见我第一个问题中的编辑#02,拆分方法报告error@Golia…u应转换为字符串convert.ToString(dt2.Rows[0][“A”]).Split(',');您可以尝试以下方法