小编str*_*own的帖子

合并两个集合并对重复项的字段求和

我有两个系列:

public interface ISomeNeededInterface
{
    string Name { get; set; }
    Guid Guid { get; set; }
}

public class Order : ISomeNeededInterface
{
    public string Name { get; set; }
    public Guid Guid { get; set; }
}

public class SalesOrder
{   
  public string Name { get { return Item.Name;} }
  public double Price { get; set; }
  public int Quantity { get; set; }
  private ISomeNeededInterface Item { get; private set; }

  public SalesOrder(ISomeNeededInterface _item)
  {
    Item = …
Run Code Online (Sandbox Code Playgroud)

c#

-8
推荐指数
1
解决办法
580
查看次数

标签 统计

c# ×1