I have a class with a public property in it. As follows in the example:
Public Property exemplo As List(Of Uso)
Get
Return x_exemplo
End Get
Set
x_exemplo = Value
End Set
End Property
Private x_exemplo As List(Of Uso)
I can use it quietly. However, what I need is to dynamically name it. That is, the name "example" can not be fixed. Sometimes it will be example2, other "test", etc. It is possible? Call some function or method that defines the name of the property?
In my main file, the class is called while reading a JSON file:
For Each valor In classe-principal.propriedade-da-classe-principal.propriedade-de-outra-classe.exemplo
...
Next
That is, "main-class-property", "other-class-property" are key names of the JSON file. "example" is also, but it is a dynamic name, which depending on the file, changes its name. I have already been able to identify the dynamic name of the key, I just need to use that name as the 'property name', so I can get into it and get the next json values.