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)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…