21.Does c# support multiple inheritance?
No,its impossible which accepts multi level inheritance.
22. What is ENUM?
Enum are used to define constants.
23. What is a data set?
A DataSet is an in memory representation of data loaded from any
data source.
24. What is the difference between private and public keyword?
Private: The private
keyword is the default access level and most restrictive among all other access
levels. It gives least permission to a type or type member. A private
member is accessible only within the body of the class in which it is declared.
Public: The public keyword is
most liberal among all access levels, with no restrictions to access what so
ever. A public member is accessible not only from within, but also from
outside, and gives free access to any member declared within the body or
outside the body.
25. Define polymorphism?
Polymorphism means one name, multiple forms. It allows us to
have more than one function with the same name in a program. It allows us
to have overloading of operators so that an operation can exhibit
different behaviors in different instances.
26. What is Jagged Arrays?
A jagged array is an array whose elements are arrays.
The elements of a jagged array can be of different dimensions
and sizes.
A jagged array is sometimes called an array–of–arrays.
27. What is an abstract base class?
An abstract class is a class that is designed to be specifically
used as a base class. An abstract class contains at least one pure
virtual function.
28. How is method overriding different from method overloading?
When overriding a method, you change the behavior of the method
for the derived class. Overloading a method simply involves having another
method with the same name within the class.
29. What is the difference between ref & out parameters?
An argument passed to a ref parameter must first be initialized.
Compare this to an out parameter, whose argument does not have to be
explicitly initialized before being passed to an out parameter.
30. What is the use of using statement in C#?
The using statement is used to obtain a resource, execute a
statement, and then dispose of that resource.
31.What is serialization?
Serialization is the process of
converting an object into a stream of bytes.
De-serialization is the opposite
process of creating an object from a stream of bytes.
Serialization / De-serialization is mostly used to transport
objects.
32. What are the difference between Structure and Class?
Structures are value type and Classes are reference type
Structures can not have contractors or destructors.
Classes can have both contractors and destructors.
Structures do not support Inheritance, while Classes support
Inheritance.
33. What is difference between Class And Interface?
Class is logical
representation of object. It is collection of data and related sub procedures
with defination.
Interface is also a class
containg methods which is not having any definations.Class does not support
multiple inheritance. But interface can support.
34. What is Delegates?
Delegates are a type-safe, object-oriented implementation of
function pointers and are used in many situations where a component needs
to call back to the component that is using it.
35. What is Authentication and Authorization?
Authentication is the process of identifying users.
Authentication is identifying/validating the user against the credentials
(username and password).
Authorization performs after authentication. Authorization is
the process of granting access to those users based on identity.
Authorization allowing access of specific resource to user.
36. What is a base class?
A class declaration may specify a base class by following the
class name with a colon and the name of the base class. omitting a
base class specification is the same as deriving from type object.
37. Can “this” be used within a static method?
No ‘This’ cannot be used in a static method. As only static
variables/methods can be used in a static method.
38. What is difference between constants, readonly and, static ?
Constants: The value can’t be
changed.
Read-only: The value will be
initialized only once from the constructor of the class.
Static: Value can be
initialized once.
39. What are the different types of statements supported in C#?
C# supports several different kinds of statements are
Block statements
Declaration statements
Expression statements
Selection statements
Iteration statements
Jump statements
Try catch statements
Checked and unchecked
Lock statement
40. What is an interface class?
It is an abstract class with public abstract methods all of
which must be implemented in the inherited classes.

No comments:
Post a Comment