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 is a collection class in c#?
What is a trace and asset? Explain some differences?
What is a property c#?
What is namespace c#?
What is clr in c#?
Write a C# program to find the Factorial of n
What is boolean method?
What is application object in c#?
How do you type a null character?
What is ienumerable <> in c#?
What does void mean in c#?
4. Describe the process when we send a request URL? And who is responsible for that?
Does c# have its own class library?
What is a bool in c#?
What is appdomain in c#?