Question:You write a class named Employee that includes the following code segment.
Private m_EmployeeId As String
Private m_EmployeeName As String
Private m_JobTitleName As String
Public Function GetName() As String
Return m_EmployeeName
 End Function
Public Function GetTitle() As String
Return m_JobTitleName
End Function
End Class
You need to expose this class to COM in a type library. The COM interface must also facilitate forward-compatibility across new versions of the Employee class.
You need to choose a method for generating the COM interface. What should you do?
 

A Add the following attribute to the class definition.
<ClassInterface(ClassInterfaceType.AutoDual)> _
Public Class Employee 

B Add the following attribute to the class definition.
<ComVisible(True)> _
Public Class Employee 

C Add the following attribute to the class definition.
<ClassInterface(ClassInterfaceType.None)> _
Public Class Employee 

D Define an interface for the class and add the following attribute to the class definition.
<ClassInterface(ClassInterfaceType.None)> _
Public Class Employee
Implements IEmployee 

+ Answer
+ Report
Total Preview: 774

Copyright © 2024. Powered by Intellect Software Ltd