what is read only and constant

Answer Posted / nithya

A readonly can be initialized only the time of variable
declaration or only in the constrator,Apart from that we
cannt modify anywhere in our program.

But Constant must be initialized at the time of declaration.
And this value cannt be changed in constractor level also.

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can var be null c#?

473


Is c# front end or back end?

509


What are the different states of a thread?

529


What is interface used in c#?

581


How we can create an array with non-default values?

502






Which of these statements correctly declares a two-dimensional array in c#?

648


What is the difference between dynamic type variables and object type variables in c#?

481


What is extended class in c#?

469


State two different types of access modifiers.

555


Why is .net so popular?

523


What is Satellite Assemblies ?

550


Explain the use of Mutex in C#?

556


What is the use of delegate?

519


How do switch statements work?

474


What are the types in c#?

497