What should you do?

You create an application by using Microsoft Visual Studio .NET 2008 and the .NET Framework 3.5.
The application includes a component. The component will be referenced by the .NET and COM applications.
The component contains the following code segment.
public class Employee
{
public Employee(string name)
{}
}
The .NET and COM applications must perform the following tasks:
– Create objects of the Employee type.
– Use these objects to access the employee details.
You need to ensure that the .NET and COM applications can consume the managed component.
What should you do?

You create an application by using Microsoft Visual Studio .NET 2008 and the .NET Framework 3.5.
The application includes a component. The component will be referenced by the .NET and COM applications.
The component contains the following code segment.
public class Employee
{
public Employee(string name)
{}
}
The .NET and COM applications must perform the following tasks:
– Create objects of the Employee type.
– Use these objects to access the employee details.
You need to ensure that the .NET and COM applications can consume the managed component.
What should you do?

A.
Change the Employee class to a generic class.

B.
Change the constructor to a no-argument constructor.

C.
Set the access modifier of the class to internal.

D.
Set the access modifier of the constructor to protected.



Leave a Reply 0

Your email address will not be published. Required fields are marked *