What is the difference b/w Readonly Variable and Constant
Variable?
Answer Posted / nishant vishwakarma
A const field can only be initialized at the declaration of the field. A readonly field can be initialized either at the declaration or in a constructor. Therefore, readonly fields can have different values depending on the constructor used. Also, while a const field is a compile-time constant, the readonly field can be used for runtime constants
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
So you know which dll is used for microsoft .net run time?
What is the importance of a Button control?
Define cls?
What is datatype conversion?
Can you please explain the difference between dataset and datareader?
Can you please explain the difference between namespace and assembly?
How do you define a read only property in a class module?
Explain how can we remove handlers at run time?
what is difference between web.config and machine.config and where it will be ?
What are the differences between c# and visual basic.net?
Explain nested classes?
Why should you use delegate?
Explain about delegate?
How do you use two datareaders at the same time in a vb.net windows application ?
Explain about garbage collection?