The preamble is duplicated from my previous question
In vb.net I can identify and use properties with parameters, and to define parameterized properties not only in classes but also in the interfaces, the parameters can be declared optional. This is a very convenient feature when you want to return (or set) a value for the property, which something depends.
Here's an example vb.net:
"'IndustryPublic NotInheritable Class Industry : Implements IEnum(Of Byte) "'Code branch directionsPublic ReadOnly Property Code As Byte Implements IEnum(Of Byte).ID "'Name industry trends"'The language in which to return the name. If the language is not set or it is not supported, it will use the language assigned in the context of the current thread.Public ReadOnly Property Name(Optional language As Language = Nothing) As String Implements IEnum(Of Byte).Name Get Return ... End Get End Property 'and so on... End Class
I have realized that c# is inferior language vb.net from the point of view of semantics, but did not expect that in C# there is the complexity associated with seemingly basic things. And that vb.net done "one line", then c# is a continuous balancing act. The only advantage that I noted is the compactness of code that is dictated by the structure of syntactic constructions, and not something else. Eventually come to the conclusion that in 99.(9)% vb.net no less powerful language than c#. And my question is only one of the few on this topic.
Back to the question:
I looked about indexed properties, but do not understand how to implement them for the occasion I described above. Do I understand correctly that this functionality need to implement with the use of indexes?, if so, how? or I something not dug up?