Professional Documents
Culture Documents
C# Test Chapter 14.15.16
C# Test Chapter 14.15.16
2
&
3
&
4
&
1
2
8
&
9
1
0
T. Y. B. Sc. IT
SEMESTER VI
Chap 16 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
12 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) Events are of value type. _____
4) Non static methods can not be used in
delegate___
Complete & comment on the following
13 ___________________________________________
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
14 Three places where delegates can be
overloaded
declared: 1) ____ _________________________
___________________________________________
2)_________________
___________________________________________
3)__________________________________________
_
2 Advantages of using
delegates___________________
_____________________________________________
_____________________________________________
General syntax for declaring a delegate
15 Define delegates_________
_____________________
____________________________________________
List four steps of using delegates
16 All delegates are of __________ type and
1>__________________________________________
represents ____________________ class.
_
2>__________________________________________
_
3>_________________________________________
__
4>__________________________________________
_
What are
17 Two restrictions for using Multicast
events_______________________________
&
delegates. 1) ____
____________________________________________
18 ____________________________________________
2)__________________________________________
_
1
9
&
2
0
20
6
7
f) Constant_____________
g) Array_______________
h) abstract method_______
i) Copy Constructor_____
j) Property.____________
2 Differences between classes and Interface methods
1) __________________________________________
___________________________________________
2) __________________________________________
___________________________________________
List 4 modifiers that can used with interface methods
___________________________________________
___________________________________________
11
Use of as keyword
___________________________________________
___________________________________________
State whether the statements are true or false
5) interface cannot have non static member. _____
6) interface is value type. ______
7) Interface can have a property with get set ____
8) Multilevel inheritance is not allowed in Interface___
9) Two interfaces cannot use same base interface ____
Use of : (colon) in class for interface
14
16
17
Mark
V for valid
I for invalid
Member of interface
12
13
15
8
&
18
9
&
19
10
____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________
19
____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________
20
T. Y. B. Sc. IT
SEMESTER VI
Chap 15 Test
Time 20 Min Total 20
rd
Marks Date: 23 Feb 2012
Students Name: ____________________________________________
Roll No:
Write the proper
k) can be
11 What operator overloading is necessary?
match
overloaded
1)
_______________________________
1. : operator :
l) must be in pair
________
______
m)
take no
________________________________________
2. Unary bitwise : ____
argument
2)
_______________________________
3. Comparison Opr :___ n) Not allowed
_________
4. Operator
o) One name many
________________________________________
overloading : __
form
2 Restrictions for comparison operator
12 Two rules for operating overloading
overloading
2)
____________________________________
1) __________________________________________
__________________________________________
___________________________________________ 2)
2) _______________________________________
__________________________________________
_________________________________________
___________________________________________
List 4 types of operator that cannot be
13 Comment on compound arithmetic opr
overloaded
overloading
___________________________________________
____________________________________________
___________________________________________
____________________________________________
Applications of operator
14 List four types of overloadble operators
overloading._______________
1>________________ 5> ___________________
______________________________________________
2>_________________ 4>____________________
______________________________________________
9
&
1
0
15
17
&
18
16
19
20
Define operator
overloading_____________________
____________________________________________
Two differences between operator
overloading in C++ and operator
overloading in C#._________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________