What is the Difference between read only and constant
variables?
Answer Posted / kishore maddineni
all above answers are correct.But there is another point.
readonly variable can be assigned at declaration or at run
time which is must be in constructor. Readonly value can't
be modified.
Constant variable must be assigned at the time of
declaration only ,which is can't be modified.
| Is This Answer Correct ? | 36 Yes | 7 No |
Post New Answer View All Answers
What do u mean by delegation?
What is difference between Trace and Debug
Write a console application and implement the ternary operator to decide whether the age a user entered after being prompted is allowed to vote or not(given that only citizens between 18 and 120 years only inclusive can vote). Use exception handling for non-numerical input.
Define an assembly in .net?
Why do we need interfaces in c#?
What is definition in c#?
Why do we override in c#?
What is a linked list c#?
Describe ways of cleaning up objects in c#.
Is datetime value type c#?
1. Describe page life cycle?
How can it prevents DLL Hell assembly versioning in .NET?
What is hashmap in c#?
What are the different approaches of passing parameters to a method?
How do you mark a method obsolete?