将ISet转成IList类型 yangan

public IList<T> ConvertToIList<T>(ISet<T> lstSet)
{
        ISet<Item> distinctResults = new HashedSet<Item>(results);
        IList maxAmounts = new ArrayList();
        foreach (Item item in distinctResults)
        {
            double maxAmount = 0;
            foreach (Bid bid in item.Bids)
            {
                if (maxAmount < bid.Amount)
                    maxAmount = bid.Amount;
            }
            maxAmounts.Add(new MaxAmount(item.Id, maxAmount));
        }
    }
原文地址:https://www.cnblogs.com/xlx0210/p/1634959.html