Default Public Property Item(ByVal index As Integer) As SearchItemInfo
            Get
                Return CType(List(index), SearchItemInfo)
            End Get
            Set(ByVal Value As SearchItemInfo)
                List(index) = Value
            End Set
        End Property

解决方案 »

  1.   

    public SearchItemInfo Item { 
     get { 
       return ((SearchItemInfo)(List(index))); 
     } 
     set { 
       List(index) = value; 
     } 
    }
      

  2.   

    public SearchItemInfo Item { 
     get { 
       return ((SearchItemInfo)(List[index])); 
     } 
     set { 
       List[index] = value; 
     } 
    }
      

  3.   

    Public SearchItemInfo this[int index]
          Get
              return (SearchItemInfo)List[index];
          Set
               List[index] = value;
      

  4.   

    楼上两位搞错了吧,VB.Net里面的Item在C#里面是this哦。刚刚翻书确认了一下哦。
      

  5.   

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

  6.   

    呵呵,多谢LeeCamus(李斌)指正,拷了楼主的代码忘了改了。