Tuesday, November 13, 2007

Overriding Index of a Generic List

using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
namespace Application.DomainModel.Collections
{
    public class Couriers<Courier> : List<Courier>
    {
        public Courier this[string courierCode]
        {
            get
            {
                return this.Find(delegate(Courier courier)
                { return (string.Compare(courier.CourierCode, courierCode) == 0); });
            }
        }
    }
    public class Courier
    {
        public string CourierCode { getset; }
    }
}

No comments:

iPhone Launch Screen Sizes

iPhone Portrait iOS 8 Retina HT 5.5 = 1242 X 2208 Retna HD 4.7 = 750 X 1134 iPhone Landscape iOS 8 Retina HD 5.5  2208 X 1242 iPho...