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

What is meant by generics in c#?

504


What is difference between comparable and comparator?

466


Define an array?

530


What is private class in c#?

482


State the top.NET class that everything is derived from?

525






What is thread life cycle in c#?

478


What are the properties of c#?

492


Explain about generics in c#.net?

517


What is a generic method?

489


Is int a struct in c#?

492


What are Regex / regular expressions ?

601


How to use the sreamReader class to read form a text file?

554


What is the difference between const and static read-only?

501


What is the use of properties window?

504


Define boxing and unboxing in c#?

483