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 class that allows an element to be accessed using unique key?
What is meant by jagged arrays?
Explain about the keyword must inherit?
What is datatype conversion?
What is difference between import system.data.sqlclient,system.data.oledb?
What is visual basic.net culture?
How to store images in sql server database through vb.net?
Name the two main parts of .net?
Explain global assembly cache (gac)?
What is the use of assembly?
How does vb.net achieve polymorphism?
How a base class method is hidden?
What is late binding and early binding?
Which class allows an element to be accessed using unique key?
Explain jit?