Click here to Skip to main content
16,020,315 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
I have 4 conditions say A,B,C,D.
If any two in 4 is true how excute a statement any onw pls suggest me a solution for it...
Posted

1 solution

hi,

Use below process:

C#
int flag = 0;
if(a)
{
flag = flag+1;
}
if(b)
{
flag = flag+1;
}
if(c)
{
flag = flag+1;
}
if(d)
{
flag = flag+1;
}
if(flag >=2)
{
//Execute Statement
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900