将ISet转成IList类型

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));
        }
    }
posted @ 2009-12-29 13:00  yangan-wu2008  阅读(478)  评论(0编辑  收藏  举报