Difference Between ReadOnly and Constant Variable in
compile time and Run Time.

Answer Posted / karna

I am adding another point to the above answer.

as the constant variable is constant over the class,that
means,all the objects created for that class have the same
value.
but in case of readonly variables,we can assign different
values in the different instances of the class it contains.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When should I use server transfer and response redirect?

508


What is Web API Routing?

602


What are the different authentication modes in asp.net?

516


How to use multiple scriptmanager controls in a web page?

599


Explain the overview of asp.net?

558






Explain why it is useful to use mvc instead of webforms? : asp.net mvc

595


When we use cookie less session? Explain its working?

559


Differentiate globalization and localization.

585


In which situation can you not use a viewstate?

530


Explain Features in ASP.NET

572


What is data binding in asp net?

586


if i wanna deploy my asp.net project to the production server and situation is that i m still not compiled my project i have as-is on my development side now on production server we dont have a visual studio now what kind of settings i need to be to do in webconfig /machine.config file to deploy my project and in iis too....

1596


What is asp.net caching?

576


Explain what is viewstate?

542


How to use a Master Database in Asp.net?

561