SyntaxFix
Write A Post
Hire A Developer
Questions
Since .Net >= 5.0 the best way is to use Any:
if(!array.Any()) { //now you sure it's empty }
For nullable arrays:
if(!(array?.Any() == true)) { //now you sure it's null or empty }