What is the Difference between read only and constant
variables?
Answer Posted / vijay bhaskar semwal
some more difference
Unlike const, when using readonly, the value is set when
the instance is created. This means that you can specify
the value of the readonly in the constructor of your class.
Another difference between const and readonly, is that
const are static by default, where with readonly, you must
define it as static (if you want it to be).
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is the difference between firstordefault and first?
What does string intern do?
Are c# references the same as c++ references?
What are c# i/o classes?
Which language is used for desktop application?
What is the use of static in c#?
What are namespaces, and how they are used?
What is an array of arrays called?
Enlist the different types of classes in c#?
What is before string in c#?
Is c# an array?
Describe the parts of assembly.
What do you mean by abstract class in c#?
What is an inheritance in c#?
What is out in c#?