-
December 12th, 2008, 09:34 PM
#1
[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)
-
December 12th, 2008, 09:59 PM
#2
Re: Creat Property in th CLass
1) Please dont use tiny fonts..stick with the defaults.
2) Is there a question here?
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
December 12th, 2008, 11:04 PM
#3
Re: Creat Property in th CLass
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?
-
December 13th, 2008, 05:58 AM
#4
Re: Creat Property in th CLass
Waht is Set doing, and what is Get doing?
-
December 13th, 2008, 01:17 PM
#5
Re: Creat Property in th CLass
Originally Posted by nader
Waht is Set doing, and what is Get doing?
Set is setting.
Get is getting.
Three5Eight
Using: MS C# 08 EE, MS SQL 05 EE, C++ .Net 08 EE, Vista Home Premium, XP Home
-
December 13th, 2008, 04:03 PM
#6
Re: Creat Property in th CLass
Did you get what is set by Three5Eight?
-
December 13th, 2008, 08:43 PM
#7
Re: Creat Property in th CLass
Do you mean the Get is read the property as in
MsgBox(D.BirthDate)
-
December 13th, 2008, 09:44 PM
#8
Re: Creat Property in th CLass
Yes, that is getting the BirthDate.
And this is setting the birthdate.
Code:
D.BirthDate = "1/10/2008"
-
December 13th, 2008, 09:48 PM
#9
Re: Creat Property in th CLass
That's What I have asked before in POst 1
Thank you for heLP!
-
December 13th, 2008, 10:03 PM
#10
Re: [RESOLVED] Creat Property in th CLass
And you were correct all along.
-
December 14th, 2008, 06:22 PM
#11
Re: [RESOLVED] Creat Property in th CLass
-
December 14th, 2008, 10:25 PM
#12
Re: Creat Property in th CLass
Originally Posted by dee-u
Did you get what is set by Three5Eight?
lol
Three5Eight
Using: MS C# 08 EE, MS SQL 05 EE, C++ .Net 08 EE, Vista Home Premium, XP Home
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|