property name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hey all,

how would i get the name of the property and not the value it's storing?

For instance,

Public Property mFirstName as String
return _dr.firstName
End property

i just need the value "mFirstName" and not the value of it. How would i
reference that?

thanks,
rodchar
 
Rodchar,

I want the name of a fish do you know how I get it.

The fish has a kind of sea silver colour.

Trying to give you an anolygy how I understand your question

:-)

Cor
 
rodchar said:
how would i get the name of the property and not the value it's storing?

\\\
Imports System.Reflection
..
..
..
Public ReadOnly Property PropertyName() As String
Get
Return MethodBase.GetCurrentMethod().Name
End Get
End Property
///
 
thanks everyone, this helps.

Herfried K. Wagner said:
\\\
Imports System.Reflection
..
..
..
Public ReadOnly Property PropertyName() As String
Get
Return MethodBase.GetCurrentMethod().Name
End Get
End Property
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top