If an array is empty, it looks like you can\'t check it\'s length using \".length\". What\'s the best way to check if an array is empty?
You can use
if (array == null || array.Length == 0)
OR
if (!(array != null && array.Length != 0))
NOTE!!!!! To insure that c# will implement the short circuit correctly; you have to compare that the object with NULL before you go to the children compare of the object.
C# 7.0 and above
if(!(array?.Length != 0))