- Difference between const, readlonly and static readonly?
const: const variable value is set as constant value at compile time. it can not be changed.
readonly: readonly value can be changed at run time using constructor.
static readonly: static readonly variables value only can be changed inside static constructor at run time.
- Difference between Binary and XML Serialization?
Binary Serialization: In binary serialization, all members whether these are pubic, private or readonly are serialized. This is faster than XML serialization.
XML Serialization: It serialize only public members.
const: const variable value is set as constant value at compile time. it can not be changed.
readonly: readonly value can be changed at run time using constructor.
static readonly: static readonly variables value only can be changed inside static constructor at run time.
Binary Serialization: In binary serialization, all members whether these are pubic, private or readonly are serialized. This is faster than XML serialization.
XML Serialization: It serialize only public members.
No comments:
Post a Comment
Please leave a comment for this post