A Armin Zingler Sep 4, 2003 #2 JMMB said: Are there Indexers in VB.Net the same way they exist in C#? thanks, Click to expand... Maybe the "Default" keyword is what you're looking for: default readonly property Item(ByVal Index as integer) As Object get return ... end get end property
JMMB said: Are there Indexers in VB.Net the same way they exist in C#? thanks, Click to expand... Maybe the "Default" keyword is what you're looking for: default readonly property Item(ByVal Index as integer) As Object get return ... end get end property
J Jay B. Harlow [MVP - Outlook] Sep 4, 2003 #3 JMMB, To create an Indexer in VB.NET you define a 'Default' parameterized property Public Class JMMBCollection Default Public Readonly Property Item(index As Integer) as JMMB Get End Get End Property End Class Which defines a readonly 'indexer'. Note the property name does not need to be Item, the 'Default' keyword is the key. Hope this helps Jay
JMMB, To create an Indexer in VB.NET you define a 'Default' parameterized property Public Class JMMBCollection Default Public Readonly Property Item(index As Integer) as JMMB Get End Get End Property End Class Which defines a readonly 'indexer'. Note the property name does not need to be Item, the 'Default' keyword is the key. Hope this helps Jay
H Herfried K. Wagner [MVP] Sep 4, 2003 #4 JMMB said: Are there Indexers in VB.Net the same way they exist in C#? Click to expand... \\\ Public Class FooCollection Private m_Foo() As Foo Default Public ReadOnly Property Item(ByVal Index As Integer) As Foo Get Return m_Foo(Index) End Get End Property End Class ///
JMMB said: Are there Indexers in VB.Net the same way they exist in C#? Click to expand... \\\ Public Class FooCollection Private m_Foo() As Foo Default Public ReadOnly Property Item(ByVal Index As Integer) As Foo Get Return m_Foo(Index) End Get End Property End Class ///