[RESOLVED] Creat Property in th CLass
This is a class with property.
Code:
Public Class classDate
Private m_BirthDate As Date
Property BirthDate() As Date
Get
Return m_BirthDate
End Get
Set(ByVal Value As Date)
m_BirthDate = Value
End Set
End Property
End Class
----
Dim D As New classDate
D.BirthDate = "1 / 10 / 2008"
MsgBox(D.BirthDate)
Which line is realted to Get and which line rleated to Set?
it's mean is this line related to Set
D.BirthDate = "1 / 10 / 2008"
and this line to Get
MsgBox(D.BirthDate)
Re: Creat Property in th CLass
1) Please dont use tiny fonts..stick with the defaults.
2) Is there a question here?
Re: Creat Property in th CLass
Quote:
Originally Posted by
nader
Which line is realted to Get and which line rleated to Set?
it's mean is this line related to Set
D.BirthDate = "1 / 10 / 2008"
and this line to Get
MsgBox(D.BirthDate)
Aren't they self-explanatory?
Re: Creat Property in th CLass
Waht is Set doing, and what is Get doing?
Re: Creat Property in th CLass
Quote:
Originally Posted by
nader
Waht is Set doing, and what is Get doing?
Set is setting.
Get is getting.
Re: Creat Property in th CLass
Did you get what is set by Three5Eight?
Re: Creat Property in th CLass
Do you mean the Get is read the property as in
MsgBox(D.BirthDate)
Re: Creat Property in th CLass
Yes, that is getting the BirthDate.
And this is setting the birthdate.
Code:
D.BirthDate = "1/10/2008"
Re: Creat Property in th CLass
That's What I have asked before in POst 1
Thank you for heLP!
Re: [RESOLVED] Creat Property in th CLass
And you were correct all along.
Re: [RESOLVED] Creat Property in th CLass
Re: Creat Property in th CLass
Quote:
Originally Posted by
dee-u
Did you get what is set by Three5Eight?
lol