What is the Difference between read only and constant
variables?
Answer Posted / parmjit
We can assign a value to a readonly variable at runtime
till it is a unassined identifier, but once value is
assigned, it cannot be changed.
In case of const we cannot assign a value at run time i.e.
the value assigned to it at declaration time cannot be
change
Is This Answer Correct ? | 39 Yes | 3 No |
Post New Answer View All Answers
What are the uses of namespaces?
Is is possible to force garbage collector to run?
What does mean before a string in c#?
Name any three ways to pass parameters to a method in c#?
Is stringbuilder faster than string concatenation c#?
What is a multicast delegate in c#?
What is binary search tree in data structure?
Is c# code is managed or unmanaged code?
Define MSIL, and how does it works? Why our developers need an appreciation of it if at all?
Explain the Abstract class in c#.net
What is icomparer in c#?
What is lazy in c#?
Explain about CTS?
Is c# or c++ better for games?
What is escape sequence in c#?