I have this list of object:
public class Location
{
public string area { get; set; }
public string sensorId { get; set; }
public string address { get; set; }
}
List<Location> items = List<Location>(){
new Location(){area = "london ", address ="king road", sensorId ="2134"},
new Location(){area = "moscow", address ="george str", sensorId ="2134"},
new Location(){area = "york ", address ="johnson str ", sensorId ="2134"},
new Location(){area = " tokyo", address ="king road 5", sensorId ="2134"},
new Location(){area = "paris", address ="elitom road", sensorId ="2134"}
}
how can I remove white spaces in area and address properties in items variable using linq?