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

Answer Posted / saiish bhat

readonly is compile time constant.
constant is runtime constant.

constatnt field is used to initialize at the declaration of
the field.
readonly field is used at the declaration or constructor of
the field.

Is This Answer Correct ?    0 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What parameters can you pass in the url of the api?

851


Why is xap important?

786


witch is the best insistute in sharpoint course.what abt future of share point course.

2969


What is the difference between the asp and asp.net?

705


What is view state management in asp net?

667


Can we have multiple worker process in an ASP.NET application? If so then how it has been handled by application? And who handles it?

749


Define page fragment caching?

691


Are xaml file compiled or built on runtime?

737


Explain the function of new view engine in asp.net? : asp.net mvc

753


Explain the difference between response.redirect vs server.transfer

861


What are the types of validation in asp net?

746


What is protected configuration?

839


Explain about asp.net 2.0 themes?

731


Let's say I have an existing application written using vb6 and this application utilizes windows 2000 com+ transaction services. How would you approach migrating this application to.net?

722


How is my content secured from unauthorized access?

712