【发布时间】:2014-12-06 21:42:18
【问题描述】:
我有课Product
public class Product
{
public string Name{get;set;}
public int Quantity{get;set;}
// and other
}
经过一些操作,我得到List<Product>。
如何从该列表中创建格式为productName1(productQuantity1), productName2(productQuantity2), ... 的字符串?
我应该使用String.Join,但不知道如何将它与一些动态对象或 KeyValuePair 一起使用(如果我使用 Select 来获取此类对象)。
【问题讨论】: