Is there an error in the below code? [code] Private _intSide As Integer Public Property Side As Integer _intSide=_intSide+2 End Property [/code]

Is there an error in the below code?
Code:
Private _intSide As Integer
Public Property Side As Integer
_intSide=_intSide+2
End Property
A. No error
B. Runtime Error
C. Syntax error
D. Compilation Error
 
Answer: D
Explanation: Public members are visible to the application using the instance of a given class, private members are invisible. To access the private members, public member functions have to be used.
 

Tìm kiếm

Back
Top