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

What is the difference between a private assembly and a shared assembly?

558


What is a Managed Code??

546


Why objects are stored in heap in c#?

484


What does the dispose method do with the connection object?

537


what is IEquatable

569






What is c# entity framework?

496


Is void a class?

485


Difference between call by value and call by reference in C#?

525


Define delegate?

546


What is a hash table in c#?

517


Why are strings in c# immutable?

503


Can you access a hidden base class method in the derived class?

506


What is datarelation c#?

465


What is the difference between ref and out in c#?

468


What is the difference between paramaterized constructor and copy constructor?

511