Explain Get, Let, Set Properties.



Explain Get, Let, Set Properties...

Answer / 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

More Visual Basic Interview Questions

What is the difference between a Dynaset and Snapshot and how would you create one?

2 Answers  


Is it possible to Manipulate data through flexgrid? Explain.

0 Answers  


Where can I get updated VB and other Microsoft files?

0 Answers  


What are some methods you can use to send data from one VB executable to another one?

0 Answers  


Recordset object consists what?

0 Answers  






To connect the Data Control with Back end What are all the properties to be set?

1 Answers  


Is there any Edit method in ADO Data Access method?

0 Answers  


What is Static Variable?

3 Answers  


Scope of API's can be of types, what are they?

0 Answers  


What is the difference between change event in normal combobox and dbcombobox?

0 Answers  


wat is excel

4 Answers   Kingfisher,


How would you map properties to controls by using ActiveX Control Interface Wizard?

0 Answers  


Categories