Explain Get, Let, Set Properties.

Answer Posted / vishal sinha

The Let property is used to assign values to the attributes
of a class. The following is an example of a Let property.

Public Property Let Minute(ByVal m As Integer)
If (m >= 0 And m < 60) Then
mMinute = m
Else
mMinute = 0
End If
End Property


With Get and Set, it's as simple as it sounds...

The Get property is similar to a function in that it returns
a value. It is used return the attributes of a class. The
following is an example of a Get Property called Minute that
returns the private data member, mMinute.

Public Property Get Minute() As Integer
Minute = mMinute
End Property

Objects may not be assigned values directly. Instead, an
object reference is required. With properties, this is
achieved using the Set property.

Public Property Set EndTime(ByVal t As CClock)
Set mFinish = t
End Property

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Draw Sequence Modal of DAO? Explain.

1699


How can you Implement windows functionality in VB?

1687


Specify technical & functional architecture of your last 2 projects.

1612


What is the default model of the form?

1631


which property of menu cannot be set at run time.

1497






Which method is used to write context Into file?

1563


Explain about creating VB applications in excel?

661


How would you use ActiveX Dll and ActiveX Exe in your application?

1529


How can you Navigate from the DHTML application to another DHTML application? .

1620


What is datagrid in vb net?

500


I'm getting error message "Reserved Error [-nnnn] ("There is no message for this error")" from Jet Engine 2.0.Why?

1063


Is visual basic easy?

540


How would you attach pictures in Treeview Control?

1544


Is it possible to Access BackEnd procedures?

1589


How can Visual Basic be used for server-side scripting?

533