public string printCurrentLocation(List<LocationStruct> locationList) { string retLocationList = ""; foreach(uint id in currentLocationIDs) { retLocationList += LocationStruct.getLocation(id, locationList).printLocation(); } return retLocationList; }
public static LocationStruct getLocation(uint id, List<LocationStruct> locationList) { foreach (dynamic loc in locationList) { if (loc.id == id) { return loc; } } LocationStruct location = new LocationStruct(); location.ClearLocation(); return location; }
public string printReservedLocation(List<LocationStruct> locationList) { return LocationStruct.getLocation(reservedLocationID, locationList).printLocation(); }