vivekj2004
asked on
C#
what is the meaning of o in the code following... does it point to status in the foreach loop.
foreach (var status in statuses)
{
if (excludeStatuses.Exists(o => o.Equals(status)))
{
badStatus = true;
}
}
foreach (var status in statuses)
{
if (excludeStatuses.Exists(o => o.Equals(status)))
{
badStatus = true;
}
}
o is the same type as that of the excludeStatuses collection. I'm assuming it's of type Status.
So, if this excludeStatus collection contains a status element that matches the status value being evaluated, then set badStatus = true.
So, if this excludeStatus collection contains a status element that matches the status value being evaluated, then set badStatus = true.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
All the answers were decent except for this answer, which was perfectly described in english.
then it is looking in (most likely) a list to see if that current object exists in it if it does then it sets the bool badStatus to true.