header1.html

Monday 8 April 2013

C# Quiz-1


C# Quiz-1
1.Every class directly or indirectly extends the______class
System
Drawing
Console
Object


2.In order for a class to use an interface, it must
)inherit the properties of the interface
contain the same methods as the interface
create an interface objects
all of the above


3.What is the proper header for a class that intends to use an interface.
class MyClass IFace
class MyClass ; IFace
class MyClass : IFace
class MyCalss {IFace}


4.Is it possible to pass methods as arguments for other methods without modification.
True
false


5.String mystring; Creates a(n)
Class
Constructor
Object
a and b


6. In the body of a method, C# uses the variable named_____to refer to the current object whose method is being invoked.
call
this
do
that


7. Find any errors in the following BankAccount constructor: Public int BankAccount() { balance = 0; }
Name
Formal parameters
Return type
No errors


8.Defining two methods with the same name but with different parameters is called.
Loading
Overloading
Multiplexing
Duplexing


9.A variable declared inside a method is called a________variable
static
private
local
Serial


10.An instance method
Represents the attribute of an object
Represents the behavior of an object
Represents another class
a and b

No comments:

Post a Comment