You need to create a class definition that is interoperable along with COM. You need to ensure
that COM applications can create instances of the class and can call the GetAddress method.
Which code segment should you use?
A. Public Class Customer
Private m_AddressString As String
Public Sub New(ByVal Address As String)
m_AddressString = Address
End Sub
Public Function GetAddress() As String
Return m_AddressString
End FunctionEnd Class
B. Public Class Customer
Shared m_AddressString As String
Public Sub New()
End Sub
Public Shared Function GetAddress() As String
Return m_AddressString
End FunctionEnd Class
C. Public Class Customer
Private m_AddressString As String
Public Sub New()
End Sub
Public Function GetAddress() As String
Return m_AddressString
End FunctionEnd Class
D. Public Class Customer
Private m_AddressString As String
Public Sub New()
End Sub
Private Function GetAddress() As String
Return m_AddressString
End FunctionEnd Class
Answer: C
that COM applications can create instances of the class and can call the GetAddress method.
Which code segment should you use?
A. Public Class Customer
Private m_AddressString As String
Public Sub New(ByVal Address As String)
m_AddressString = Address
End Sub
Public Function GetAddress() As String
Return m_AddressString
End FunctionEnd Class
B. Public Class Customer
Shared m_AddressString As String
Public Sub New()
End Sub
Public Shared Function GetAddress() As String
Return m_AddressString
End FunctionEnd Class
C. Public Class Customer
Private m_AddressString As String
Public Sub New()
End Sub
Public Function GetAddress() As String
Return m_AddressString
End FunctionEnd Class
D. Public Class Customer
Private m_AddressString As String
Public Sub New()
End Sub
Private Function GetAddress() As String
Return m_AddressString
End FunctionEnd Class
Answer: C
No comments:
Post a Comment