.NET 6 foreach nur wenn nicht null
List<string> items = null;
items?.ForEach(item =>
{
// ...
});
Combative Cicada
List<string> items = null;
items?.ForEach(item =>
{
// ...
});