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

What are the Difference between asp.net and asp ?

573


Can I read the hard disk serial # of the client computer using asp.net?

558


Please briefly explain the usage of global.asax?

538


What is the differences between a primary key and a unique key in sql server?

536


How do I open an ashx file in windows 7?

573






Why session is necessary in web application?

513


Explain diff. Between friend and protected friend?

500


Whats the difference between registerclientscriptblock, registerclientscriptinclude and registerclientscriptresource?

586


How do you declare static variable?

563


Explain Apache web servers ? How can you get ASP.NET running in Apache web servers - why should you do this?

513


What are the types of session in asp.net?

528


Where the cookie value is stored?

511


What is inproc and outproc?

525


What is the main differences between asp and asp.net?

527


Explain the asp.net mvc folder conventions? : asp.net mvc

510