C# does not allow you to create 'named' indexed properties.
There are no plans to include the ability to declare your own properties that take parameters.
Instead of using an indexed property you should use a type with an indexer which is returned by a property.
The property is there to get access to an object and belongs to the parent object.
The indexer is used to enumerate through an object and belongs to the returned object.
This allows more than one indexed property on a type.
This allows property getters and setters to take arguments
Public Property Something(ByVal a As String) As String
MyDictionary(v) = value
© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext