-1

我有带有 ID 和名称的位置列表,例如

public class Dim_Location
{
    public int ID{ get; set; }
    public string LocationName{ get; set; }
    public string ClienId{ get; set; }
}  

private List<string> loadLocation(int clientIdx)
{
    List<Dim_Location> LocationList = dim_Location.GetLocation(clientIdx);
      //Combine here List<ID+";"+LocationName> and make List<string>
}

现在我想List<ID+";"+LocationName>LocationList.

4

1 回答 1

2
var result = LocationList.Select(x => x.ID + ";" + x.LocationName);
于 2013-05-16T21:09:59.867 回答