KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
var strs = new Collection<string>(); bool b = strs.All(str => str == "ABC"); The code creates an empty collection of string, then tries to determine if all the elements in the collection are "ABC". If you run it, b will be true. But the collection does not even have any elements in it, let alone any elements that equal to "ABC". Is this a bug, or is there a reasonable explanation?
Tags (comma-separated)
Save Edits
Cancel