Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
if (!flag == true) {


           // allow him
       } else {
           alert("else");
           return ValidateIndicators(this);
       }


i would like to return validateindicators method the above is correct syntax? and please check the flag also.
Posted
Comments
[no name] 22-May-15 3:51am    
no
raxhemanth 22-May-15 5:18am    
can u please tell me how can i write it in a right way?
Praveen Kumar Upadhyay 22-May-15 9:57am    
Yes this is absolutely right syntax.
if(!flag == true)
Here !flag will evaluate first and then it will get compared with boolean true, but I didn't understand the intention behind this code snippet.

1 solution

Yes, the syntax is correct. All you have to do is debug it to know if the syntax is correct and also to see if it does what you actually want.
 
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