【发布时间】:2011-02-16 14:47:10
【问题描述】:
Public Class IndexableLinkedList(Of T)
Inherits LinkedList(Of T)
'??? implement an index 'property' '
End Class
【问题讨论】:
-
在实施此操作之前,您可能需要查看有关 indexed linked lists 的另一个 SO 问题。
Public Class IndexableLinkedList(Of T)
Inherits LinkedList(Of T)
'??? implement an index 'property' '
End Class
【问题讨论】:
您可能(?)寻找的信息是索引器属性需要标记为Default:
Public Default Property Item(ByVal index As Integer) As T
Get
' Return something
End Get
Set(ByVal value As T)
' Set something
End Set
End Property
也就是说,在性能方面,将索引器与链表结合使用可能不是一个好主意。
【讨论】: