Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

.net 6 foreach only if not null

List<string> items = null;
items?.ForEach(item =>
{
    // ...
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #foreach #null
ADD COMMENT
Topic
Name
4+4 =