Python has a setattr to set public attributes for any class on the fly.
So, how to do that with VB.net ?
I mean :
Public Class abc
...
End Class
' Set it as :
abc.setattr("prop", 5)
' Use it as :
Dim ob As New abc
value = abc.prop
Is that possible with VB.net – If yes, Please explain how ?
There is no such feature in VB.NET. You have to define Properties manually.
For instance – Anonymous types.
Or
Named types