索引器

int this[int index]
    {
        get;
        set;
    }
===========

public class Int16Collection : CollectionBase
{

    public Int16 this[int index]
    {
        get
        {
            return ((Int16)List[index]);
        }
        set
        {
            List[index] = value;
        }
    }
.....

posted @ 2009-09-23 13:08  greencolor  阅读(134)  评论(0编辑  收藏  举报