Question : State whether below code would give compilation error or not ?

Question : State whether below code would give compilation error or not ?

delegate string Delegate1(object o);

delegate object Delegate2(string s);

static string Dispaly(object o) {

return “Display”;

}

static void Main(string[] args)

{

Delegate1 d1 = Display;

Delegate2 d2 = Display;

}

Answer :

It will give no compilation error .

Leave a Reply