Question:

You write the following class that has three methods.

Public Class SimpleEmployee

Private ni_EmployeeId As String

Private m_EroployeeName As String

Private m_JobTitleName As String

Public Function GetID() As String

Return m_EmpioyeeID

End Function

Public Function GetName() As String

Return tti_EmployeeNatne

End Function

Public Function GetTitle() As String

Return ra_JobTitleNarne

End Function

End Class

You need to expose the class to COM in a type library. The COM interface must not expose the method GetEmployeeld. The GetEmployeeld method must still be available to managed code.

You need to hide the GetEmployeelD method from the COM interface.

What should you do?

You need to expose the class to COM in a type library. The COM interface must not expose the method GetEmployeeld. The GetEmployeeld method must still be available to managed code.

You need to hide the GetEmployeelD method from the COM interface.

What should you do?

 

A Apply the ComVisible attribute to the class and methods in the following manner.
[<ComVisible(True)>_

Public Class SimpleEmployee
Private m_EmployeeId As String
Private m_EmployeeName As String
Private m_JobTitleNanne As String
Public Function GetID() As String
Return m_EroployeeId
End Function
<CowVisible(True)>
Public Function GetName() As String
Return ro_EroployeeName
End Function
<ComVisible(True)>
Public Function GetTitle() As String
Return m_JobTitleWame
End Function
End Class 

B Change the access modifier for the GetEmployeeld method in the following manner.
<ComVisible(False)>_
Public Class SimpleEmployee
Private m_EmployeeId As String
Private m_EmployeeName As String
Private m_JobTitleName As String
"A Composite Solution With Just One Click" - Certification Guaranteed 203 Microsoft 70-536 Exam Protected Function GetID() As String
Return m_EmployeeID
End Function
Public Function GetName() As String
Return m_EmployeeName 
End Function

Public Function GetTitle() As String
Return m_JobTitleName
End Function 

C Apply the ComVisible attribute to the class and methods in the following manner.
<ComVisible(False)>
Public Class SimpleEmployee
Private m_EmployeeId As String
Private ro_EmployeeNaine As String
Private m_JobTitleName As String
Public Function GetID() As String
Return m_EroployeeId
End Function
<ComVisible(True)>
Public Function GetName() As String
Public Function GetName() As String
Return m_EttiployeeName
End Function
<ComVisible(True)>
Public Function GetTitle() As String
Return m_JobTitleWame

End Function
End Class 

D Apply the CornVisible attribute to the GetEmployeeld method in the following manner.
Public Class SimpleEmployee
Private m_EmployeeId As String
Private m_EmployeeName As String
Private m_JobTitleName As String <CoroVisible(False) >_ Public Function GetID() As String Return m EmployeelD
End Function
Public Function GetName() As String
Return m_EmployeeNaitie
End Function
Public Function GetTitlef) As String
Return iti_JobTitleNanie
End Function
End Class 

+ Answer
+ Report
Total Preview: 538

Copyright © 2024. Powered by Intellect Software Ltd