-
Delegate
The following code illustrates a situation where a boss wants to keep track of the work progress of its subordinates: using System;namespace BigCompany { public class Boss { public void WorkerPercentageDone(int percentage) { Console.WriteLine("I am the boss, and my worker is " + percentage + "% done."); } } public class Worker { Boss boss = null; public Worker(Boss boss) ...
-
class Design
. Below is a set of birds and movements they can perform. Birds:Penguin:• hopping: moves 2 ft• flying: can't flyHawk:• hopping: can't hop• flying: moves 100 ft; won't fly if World.windSpeed > 40Robin:• hopping: moves 1 ft; won't hop if World.temperature < 0• flying: moves 20 ft; won't fly if World.windSpeed > 20Crow:• hopping: moves 1 ft; won't hop if World.temperature < 0• flying: moves 30 ft; won't...
-
-
-
-
What is the order of destructors called in a polymorphism hierarchy
A) Starts with derived class ends at base classB) Starts with base class ends at derived classC) The destructor of base can not becalledD) RandomlyExplanation: Uses Bottomup approach while calling Destructors from derived class
-
.NET run time relies on the object reference counts to manage memory
A) TrueB) FalseExplanation: .Net run time relies on Garbage Collection to manage memory
-
Which of the following is not a subclass of Value Type class
A) EnumerationsB) User defined value typesC) Boxed value typesExplanation: Boxed value types are of reference types
-
String is an
Skill/Topic: BeginnerA) object typeB) reference type