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 a dimensional array?

460


Give an example of a ctype.

555


What is a method signature c#?

515


How can I produce an assembly?

581


Does c# support try-catch-finally blocks?

474






What is the difference between IEnumerator and IEnumerable?

673


What are extensions methods in c#?

466


What are the different types of classes in c#?

489


What are the 3 different types of arrays?

559


What is Fragmentation and its Types?

563


What is session management in c#?

526


What is the default value of datetime in c#?

488


What is mvc pattern in c#?

514


What are some examples of desktop applications?

498


What do you mean by delegates and explain different types of delegates?

508