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
How to store decimal data in .net?
what's ArrayList in .Net (VB.Net or C#).What's the advantageous using ArrayList.
Explain managed code?
what is the need for dynamic controls in vb.net? i would like to know for what purpose should we create the controls dynamically? please give the answer in simple words.
What are the assembly entry points?
How can we remove handlers at run time?
Name the tool which can convert visual basic old version to .net compatibility version?
What is globalization?
What do you mean by deserialization?
What is stack used for in vb. Net?
What are nested classes?
Explain enumerator?
Write a program that would find the nth term of a geometric progression, given the value of first term and common ratio. Any inbuilt function that the language provides for calculating exponent should not be used.
What is the use of assembly?
what is difference between namespace and assembly?