Read name of variable during runtime

  • Thread starter Thread starter Peter Gast
  • Start date Start date
P

Peter Gast

Hi,
I need as parameter for a control the names of my properties as a string.
How can I get the name of the property as a string during runtime

Example:
Private _MyVar As Double
Public ReadOnly Property MyVar As Double
Get
Return _MyVar
End Get
End Property


MsgBox ( ???? MyVar.GetType ?????)

The result should be "MyVar", I've got a tip to us Type.GetField(...), but
this expressions doesn't work.


Thanks Peter
 
Back
Top