You need to ensure that CreateObject compiles successfully

You are writing the following method (line numbers are included for reference only):

You need to ensure that CreateObject compiles successfully.
What should you do?

You are writing the following method (line numbers are included for reference only):

You need to ensure that CreateObject compiles successfully.
What should you do?

A.
Insert the following code at line 02:
where T : new()

B.
Replace line 01 with the following code:
public void CreateObject<T>()

C.
Replace line 01 with the following code:
public Object CreateObject<T>()

D.
Insert the following code at line 02:
where T : Object



Leave a Reply 3

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


PaulC

PaulC

A.
Insert the following code at line 02:
where T : new()

you must require default/empty constructor to successfully call T obj = new T();

Google

Google

Below youll find the link to some internet sites that we consider you ought to visit.

Najlepszy Programista

Najlepszy Programista

fuck u