This may be stupid.but i have a simple doubt Suppose i have the following check in a function
bool Validate(string a , string b) { if(a == null || b == null)
As has been commented upon, the code is indeed 'ok'.
Using the single pipe '|' will evaluate all expressions before returning the result. '||' can be more efficient, since it ceases as soon as an expression evaluates to true.