I have a list of objects of type ROUTE
.
Each ROUTE
object contains string properties, but some objects do not contain the EXITSIGNAL
property (doesn't exist not null)
some of code :
List<ROUTE> SelectedRoutes = new List<ROUTE>();
foreach (var route in XmlData.ROUTES)
{
if (sig.SignalID.Equals(route.ENTRANCESIGNAL) &&
sig.SignalDIRECTION.Equals(route.DIRECTION) &&
"Condition on EXITSIGNAL property")
{
SelectedRoutes.Add(route);
}
}
How to add a third condition that allows me to choose only objects that contain this property "EXITSIGNAL"
Aucun commentaire:
Enregistrer un commentaire