C# Interview Questions
Reflection in C# is used to get information about assemblies, types, objects, methods fileds in an assembly. System.Reflection class is used for that
Readonly keyword | Const keyword |
---|---|
Readonly is a runtime constant. | Const is a compile time constant.. |
Values can be assigned in declaration and constructor part. | Values can be assigned only in declaration part. |
It cannot be declared inside a method. | It can be declared inside a method. |
It can be used with static modifiers. | It cannot be used with static modifiers. |
The process of converting an object into a stream of bytes to store the object and its state to memory, database or a file. Later object can be retrieved using revrese process i.e. deserialization.
Ref keyword | Out keyword |
---|---|
Parameters must be initialized before passing as a ref parameter in a function. | Parameters may or may not be initilized before passing as a out parameter in a function. |
Parameters must be initialized before passing as a ref parameter in a function. | Parameters may or may not be initilized before passing as a out parameter in a function. |
- Abstract
- Partial
- Sealed
- Static
Lorem ipsum...
Lorem ipsum...
Lorem ipsum...
Lorem ipsum...
Lorem ipsum...
Lorem ipsum...
Lorem ipsum...
Lorem ipsum...
Lorem ipsum...
Lorem ipsum...