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 the difference between firstordefault and singleordefault?
If I have more than one version of one assemblies, then how'll I use old version (how/where to specify version number?)in my application?
What is the namespace for datatable in c#?
What is a class level variable in c#?
What is parsing? How to parse a date time string?
What is response redirect in c#?
What is a hash table in c#?
What is string empty?
What is a method signature c#?
Why delegates are type safe in c#?
What is toint32 c#?
What are predicates in c#?
What is ilasm.exe used for?
How can I get around scope problems in a try/catch?
How to do and Apply Themes to Datagrid,Lable,Textbox,etc., in C#.NET 2005 Windows Application? (like who we will do themes in ASP.NET using .CSS and .SKIN files). Urgent!!