Hey there!
I have a question that I'm struggling to find an answer for on the Using Enumerations Try It Out.
Here is the code:
Code:
'Hour Property
Private Property Hour() As Integer
Get
'Return the current hour displayed
Return dtpHour.Value.Hour
End Get
Set(value As Integer)
'Set the date using the hour passed to this property
dtpHour.Value = New Date(Now.Year, Now.Month, Now.Day, value, 0, 0)
'Set the display label
lblState.Text = "At " & value & ":00, Richard is "
End Set
End Property
Question 1:
Between the Get tags, the comment says
'Return the current hour displayed.
I'm assuming this the hour displayed as set when the program runs as I'm returning the Hour value of the dtpHour object. Am I correct on this?
Question 2:
Between the set tags, the comments says:
'Set the date using the hour passed to this property
Is the date being passed to this property, the date being set by the user when the program is being run (as he changes the date / time)?
Cheers,
Sapper