Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

nullable IList to List

IList<Person> GetPersons() => someList.Where(t => t != null).ToList()!;

// or

IList<Person> GetPersons() => (IList<Person>)someList.Where(t => t != null).ToList();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #nullable #IList #List
ADD COMMENT
Topic
Name
6+5 =