I'm not sure if this is the correct term for what I want to do but basically I have a Class, say, Users similar to:
Code:
Public Class clsUsers
Private m_FirstName As String
Private m_LastName As String
Private m_EmailAddress As String
Public Property FirstName() As String
Get
Return m_FirstName
End Get
Set(ByVal Value As String)
m_FirstName = Value
End Set
End Property
Public Property LastName() As String
Get
Return m_LastName
End Get
Set(ByVal Value As String)
m_LastName = Value
End Set
End Property
Public Property EmailAddress() As String
Get
Return m_EmailAddress
End Get
Set(ByVal Value As String)
m_EmailAddress = Value
End Set
End Property
'etc. more properties go here...
'************************************************
'Methods here for Adding, Removeing, Updating, etc.
'etc.
End Class
Now what I want to be able to do is set a Property of my User by doing somehting like:
Dim myUser as New clsUsers
myUser("FirstName").Value = "Joe"
myUser("LastName").Value = "Smith"
instead of:
myUser.FirstName = "Joe"
etc.
how to?
-------------------------
Beware of programmers with screwdrivers...