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

How can you Add API functions to your Application?

0 Answers  


what is the Difference between Listindex and Tab index?

1 Answers  


What are the uses of List View Control?

0 Answers   Atul Auto,


What is meant by Establish Connection in RDO? 74.1s it possible to Access BackEnd procedures? Explain.

0 Answers  


What will be the code in VB, while saving the form and light goes off? Please tell me the exact code line.

1 Answers  






What is MAPI ?

2 Answers  


Explain OLE Drag and Drop?

0 Answers  


Difference between Linked Object and Embedded Object?

0 Answers  


How would you Create a Query Builder and Explain its uses ?

0 Answers  


What is the need of z-order method?

1 Answers  


Why can't I use an index with my VB accessed database?

0 Answers  


To find the current recordposition in data control.

0 Answers  


Categories