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
Value Type and Reference Type Data type in C#?
Is c# good for games?
What is unmannaged code and will CLR handle this kind of code or not .
What is console programming language?
What are types in c#?
What do you mean by abstract class in c#?
What is enumerable in c#?
Explain get and set accessor properties?
What is a linq in c#?
Explain the working of serialization?
Is array passed by reference in c#?
Why array is faster than arraylist in c#?
What is lazy keyword in c#?
Explain acid rule of thumb for transactions in c#.
What are the problem with .NET generics?