which code segment should you replace line 24?

You are developing an application that includes the following code segment. (Line numbers
are included for reference only.)

You need to ensure that the DoWork(Widget widget) method runs.
With which code segment should you replace line 24?

You are developing an application that includes the following code segment. (Line numbers
are included for reference only.)

You need to ensure that the DoWork(Widget widget) method runs.
With which code segment should you replace line 24?

A.
DoWork((Widget)o);

B.
DoWork(new Widget(o));

C.
DoWork(o is Widget);

D.
DoWork((ItemBase)o);



Leave a Reply 2

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


PaulC

PaulC

A.
DoWork((Widget)o);

Béni

Béni

Is ItemBase a class or a keyword in C#? I can’t find any reference to it and it seems that it is unknown to the compiler…