What is the Difference between read only and constant
variables?
Answer Posted / parmjit
We can assign a value to a readonly variable at runtime
till it is a unassined identifier, but once value is
assigned, it cannot be changed.
In case of const we cannot assign a value at run time i.e.
the value assigned to it at declaration time cannot be
change
| Is This Answer Correct ? | 39 Yes | 3 No |
Post New Answer View All Answers
What is returned if you pass the value 12.34 to the parsefloat () function?
Why do I get an error (cs1006) when trying to declare a method without specifying a return type?
What is ioc containers c#?
Explain the functionalities of satellite assembly?
Why are local variables stored in stack?
What is msil in c#?
Can a class have static constructor?
What is anonymous class in c#?
Where is the keyword void used?
What is difference between private, protected, and public in C#?
Why is dll used?
What is callback function in c#?
What do u mean by delegation of authority?
What is the difference between console and windows application?
Why do we need interface in c#?