Placement papers on Csharp - Set 1

Placement papers on Csharp - Set 1


1. If a class is using an interface, it must

inherit the properties of the interface
contain the same methods as the interface
create an interface object
all of the above
View Answer / Hide Answer

ANSWER: all of the above




2. What is the output of the code public class B : A { }

Errors
It defines a class that inherits the public methods of A only.
It defines a class that inherits all the methods of A but the private members cannot be accessed.
b and c
View Answer / Hide Answer

ANSWER: It defines a class that inherits all the methods of A but the private members cannot be accessed.




3. Sealed Classes cannot be a base class.

True
False
View Answer / Hide Answer

ANSWER: True




4. ___________________ allow to encapsulate discrete units of functionality and provide a graphical representation of that functionality to the user

controls
object
class
graphics
View Answer / Hide Answer

ANSWER: controls




5. Features of Read only variables

It is allocated at compile time
Declaration and initialization is separated
It is allocated at runtime
all of these
View Answer / Hide Answer

ANSWER: all of these




6. How to kill a user session explicitly?

Session.Close()
Session.Discard()
Session.kill()
Session.Abandon()
View Answer / Hide Answer

ANSWER: Session.Abandon()




7. Convert vs. Parse methods

Convert allows null values, Parse cannot
Convert converts the value, Parse is for parsing
Both are same
None of these
View Answer / Hide Answer

ANSWER: Convert allows null values, Parse cannot




8. Different ways a method can be overloaded in C#.NET

Different parameter data types
Different number of parameters
Different order of parameters
All of above
View Answer / Hide Answer

ANSWER: All of above


Post your comment