I watched the code snippet that I wrote in C #:
if(string.IsNullOrEmpty(param1) && string.IsNullOrEmpty(param2) && string.IsNullOrEmpty(param3)) {
and decided to make it more understandable / concise
if(string.IsNullOrEmpty(param1+param2+param3)) {
But looking at him, I cannot help but cringe. What do you think about this? Have you ever done something like this, and do you use it when applicable.
Note. The code preceding this line will manipulate the collection by adding certain elements depending on whether the parameter a (param1, param2, param3) is NOT empty. This if statement is for error checking / handling.
source share