C#.Net Interview Question and Answers
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.
|
|
Rahul, says |
Feb 14,2018 |
Also, class objects are created using new keyword where as structure objects does not necessarily use new keywords for object creation unless you want to call a specific constructor.
|
Goutamikumbhar, says |
Jan 24,2014 |
Structure allocates the memory for object on the Stack & classses allocates memory for object on the heap.
|
Rakesh, says |
Jan 04,2014 |
Structures can have constructors. but they cant have explicit parameters constructors.
|
|
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. |
|
Tony Martin, said |
July 17, 2018 |
A delegate is a reference type variable that holds the reference to a method. The reference can be changed at runtime. Delegates are especially used for implementing events and the call-back methods.
|
|
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. |
|
|