what is read only and constant

Answer Posted / ganesh

a constant must be initialized at the time of decleration
and this value cannot be changed anywhere in the program.

whereas a readonly can be initialized at anywhere in the
program and the value can be changed

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it good to use var in c#?

530


Is Facebook a desktop application?

562


Is string nullable c#?

586


Define clr in .net?

640


How can you access a private method of a class?

583






Differentiate between sqlclient oledb and providers?

587


How many types of interface are there in c#?

582


What is static and use of it?

574


What is desktop example?

586


Is string mutable in c#?

566


Is class reference type c#?

630


What does the initial catalog parameter define in the connection string?

568


Where do I put dll files?

642


What is the difference between as and is operators in c#?

519


Why c# is called type safe language?

534