Answer the question
In order to leave comments, you need to log in
How to check many variables for null?
Perhaps there is some kind of function that if at least one null element returned false
Or if there is at least one element in the array, it did a coexisting check.
Interested in how to do this in C # and Java.
Answer the question
In order to leave comments, you need to log in
In principle, you can do the check yourself:
bool Check<T>(params T[] values)
{
return values.All(val => val != null);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question