I have a List<BuildingStatus>
called buildingStatus
. I'd like to check whether it contains a status whose char code (returned by GetCharCode()
) equals some variable, v.Status
.
Is there some way of doing this, along the lines of the (non-compiling) code below?
buildingStatus.Contains(item => item.GetCharValue() == v.Status)