c# - How to check null collection? -


i have algorithm select data collection of reportdata

private idictionary<guid, jobstatistic> getagentsstatistics(ilist<guid> agentids) {      var agentreportitems = data in reportdata                             agentid in data.agentids                             agentids.contains(agentid)                             group data agentid;  ... } 

but if agentids empty collection? how check situation?

 var agentreportitems = data in reportdata                         agentid in data.agentids                         agentids != null && agentids.contains(agentid)                         group data agentid; 

just check if it's null, , if it's not, use did.


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -