mac*_*jka 2 c# dictionary list
我使用以下字典:
Dictionary<DateTime, List<string>> dictionary
Run Code Online (Sandbox Code Playgroud)
如何简单地检查值之一 - >List字符串类型是否不为空?
尝试使用Linq:
Dictionary<DateTime,List<string>> dictionary = ...
bool hasNotEmptyValues = dictionary
.Any(pair => pair.Value != null && pair.Value.Any());
Run Code Online (Sandbox Code Playgroud)