You are on page 1of 2

1

2
&
1
2

T. Y. B. Sc. IT
SEMESTER VI
Chap 16 & 17 Test
Time 20 Min Total
20 Marks
Students Name: ____________________________________________
Roll No:
Write the proper
a) All returns void
11 State whether the statements are true or
match
b) System.Console
false
1. Callable entity :
c) take no
1) Delegates can be used as base by derive
______
argument
class _____
2. callbacks : ____
d) Events
2) Delegates can be inherited by base class.
3. Multicast :___
e) Delegate
______
4. Err:________
methods
3) Standard error device is printer. _____
4) Non static methods can also be used in
delegate___
Complete & comment on the following
12 ___________________________________________
code snippet : Using System;
___________________________________________
class A{internal delegate void
___________________________________________
MyDel(string);}
____________________________________________
class B:A{internal _____delegate void
__________________________________________
MyDel(string);
___________________________________________
public B(){MyDel md = new
MyDel(Console.Write);} }
class test {public static void Main(){B obj =
new B(); obj.md(Hello);}}
List 4 types of operator that cannot be
13 Three places where delegates can be
overloaded
declared: 1) ____ _________________________
___________________________________________
2)_________________
___________________________________________
3)__________________________________________
_
Write the output of the following : using
14 Use of following characters
System;
E_________________________
1) Console.WriteLine(A={2} B={0} C={1}
G_________________________
D={2},2,2,3,4)
X_________________________
__________________________________________
C_________________________
2) Console.WriteLine(Value={0:C5},12);
__________________________________________
Differentiate between ReadLine and Read
15 What is the output of following
1)__________________________________________
class Tension{ public static void Main(){
____________________________________________
System.Console.Write(Music);
2)__________________________________________
System.Console.WriteLine(DJ Party);
____________________________________________
System.Console.Write(@Happy New
Year20\n12);
2 Advantages of using
System.Console.Write(-----------\\n------------delegates___________________
)}
_____________________________________________
Line 1 :
_____________________________________________
______________________________________ Line
2 : ______________________________________
Line 3 :
______________________________________
General syntax for declaring a delegate
16 Define delegates_________
_____________________
____________________________________________

9
&
1
0

List four steps of using delegates


1>__________________________________________
_
2>__________________________________________
_
3>_________________________________________
__
4>__________________________________________
_
Write the output of following: Using
System;
Console.WriteLine({0:c},
-1234.9876);_____________
Console.WriteLine({0:0000},
123);________________
Console.WriteLine({0:##,000%},0.12345)
;_________
Console.WriteLine(0:D8,
90909);________________

17

All delegates are of __________ type and


represents ____________________ class.

18

Ever C# program contains three ways of I/O


namely
1)____________2)____________3)_____________

19

20

Two restrictions for using Multicast


delegates. 1) ____
____________________________________________
2)__________________________________________
_
What are
events_______________________________
____________________________________________

Marks Obtained __________ in Words ___________________________ Signature of the


Examiner________

You might also like