if list is empty c# code example
Example 1: c# empty list
myList.Clear();
Example 2: c# tell if list object is empty
if(listOfObjects.Count == 0){
//when list is empty
}
Example 3: check if list contains any empty element in c#
if (myList.Any(i => i != null))
{
DoSomeThing();
}