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
What is the difference between a "jagged array" and multidimensional array" ?can anyone show me it practically ?
Explain the difference between value and reference types?
Define serialization in .net?
Explain the difference between dispose and finalize()?
What is non_deterministic finalization?
Explain the use of new keyword?
What’s the difference between private and shared assembly?
What is pre-jit?
Can you please explain the difference between value and reference types?
What is the strong name in .net assembly?
What is the advantages of VB.NET?
What is the difference between convert.tostring and i.tostring method?
How to send xml file on server using http protocol?
How to create a constant in vb.net?
What are the different types of applications supported in .net (or) .net framework?