Answers for "how to check a list is null or empty in c#"

C#
0

how to check a list is null or empty in c#

if ( (myList!= null) && (!myList.Any()) )
 {
     // Add new item
     myList.Add("new item"); 
 }
Posted by: Guest on March-29-2021

Code answers related to "how to check a list is null or empty in c#"

C# Answers by Framework

Browse Popular Code Answers by Language