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

Why do you use the app_code folder in asp.net?

547


Define viewstate in .net?

536


What is a session government?

495


Is it right that ASP.NET Web API has replaced WCF?

499


What is base class of .net?

529






How do you secure your connection string information?

510


Is asp.net and .net the same?

508


What are the difference between overriding and overloading?

496


Explain the main function of url routing system in asp.net mvc? : asp.net mvc

488


What tags do you need to add within the asp:datagrid tags to bind columns manually? How?

504


Can you explain composite pattern?

584


What are the advantages and disadvantages of Using Cookies?

514


What is routing in MVC?

587


Define machine.config in .net?

547


What is asp.net web application?

517