If I define an integer array:
int[] a = new int[13];
and I do not insert any item into it, how can I know whether the array a contains any items or is completely empty? Do I have to iterate through all the a.Length indices? In a list
List<int> b = new List<int>();
if I check:
if(b.Count == 0)
{
// The list does not contain any items.
}
Is there an equivalent way to check an array? I found on the internet the check if an array is null or empty. In my case I know for sure that the array is not null. I just wish to know whether it contains any item or not. I do not care in which position within the array and also not exactly which item. Thank you very much in advance.