Consider following class which stores the information about external urls.
In your application you somehow retrieve the list of such items:
Your goal is to use Linq to filter this list in a special way:
- if the Url is empty - the item is always returned
- if the Url is nonempty - only one item with such Url is returned
In the above case the Linq expression should return:
How effective is your solution? Can you not only think of just a solution but of an effective one?