[英]Implementing Index in VB.NET
Public Class IndexableLinkedList(Of T)
Inherits LinkedList(Of T)
'??? implement an index 'property' '
End Class
the information you're probably (?) looking for is that indexer properties need to be marked as Default
: 您可能正在寻找的信息是将索引器属性标记为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
That said, using an indexer in connection with a linked list is probably not a good idea, performance-wise. 也就是说,在性能方面,将索引器与链接列表一起使用可能不是一个好主意。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.