what is read only and constant

Answer Posted / bhuvana

Read Only and Constant are like variables whose value once
given (initialized) cannot be changed.

The difference between Read Only and Constant is that
Constant can only be initialised at the time of declartion
but
Read Only field can be initialised at the time of
declartion or in constructor.

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is reflection in c#?

500


What is the difference between “dispose” and “finalize” variables in c#?

492


Give some examples for built in datatypes in c#?

555


what is the meaning of Object lifetime in OOPS

541


What is stringbuilder c#?

517






What are the advantages of clr procedure over t-sql procedure?

599


Explain lock, monitors, and mutex object in threading.

518


What is collection class c#?

540


Is c# front end or back end?

515


Why delegates are type safe in c#?

511


What is a void c#?

511


What is the difference between static class and singleton class in c#?

492


How can I create image pieces/sub image?

491


What is the root element of an xml file?

500


Can we declare private class in c#?

484