0
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 define its name dynamically. That is, the name "example" cannot be fixed. Sometimes it will be exemple2, other "test", etc. Is this possible? Calling some function or method that defines the property name?
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, "property-of-the-main-class", "property-of-another-class" are key names of the JSON file. "example" is also, however, a dynamic name, which depending on the file, changes its name. I have already been able to identify the name of the key that is dynamic, I just need to use this name as 'property name', so I can enter it and get the following json values.
Hello @eleison, this link may be a good suggestion, but your answer will not be valid if one day the link crashes. In addition, it is important for the community to have content right here on the site. It would be better to include more details in your response. A summary of the content of the link would be helpful enough! Learn more about it in this item of our Community FAQ: We want answers that contain only links?
– Lucas Duete
Thank you @Lucasduete , I apologize, because I am new to the interactions. I made the edition as you mentioned.
– Eleison Christiano