Calling all the 3 functions while using or operator even after returning true as a result.
Posted
by Shantanu Gupta
on Stack Overflow
See other posts from Stack Overflow
or by Shantanu Gupta
Published on 2010-04-19T13:03:41Z
Indexed on
2010/04/19
13:13 UTC
Read the original article
Hit count: 220
I am calling three functions in my code where i want to validate some of my fields. When I tries to work with the code given below. It checks only for first value until it gets false result.
I want some thing like that if fisrt function returns true then it should also call next function and so on. What can be used instead of Or Operator to do this.
if (IsFieldEmpty(ref txtFactoryName, true, "Required") ||
IsFieldEmpty(ref txtShortName, true, "Required") ||
IsFieldEmpty(ref cboGodown, true, "Required"))
{ }
© Stack Overflow or respective owner