check if List value is null C# code example
Example: how to check a list is null or empty in c#
if ( (myList!= null) && (!myList.Any()) )
{
// Add new item
myList.Add("new item");
}
if ( (myList!= null) && (!myList.Any()) )
{
// Add new item
myList.Add("new item");
}