What is the Difference between read only and constant
variables?
Answer Posted / raju
1.We can assign value to readonly field, only in
constructor or while declare the variable.But in case of
const we should assign a value while declare.
2.const=static readonly
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Differentiate between static class and singleton instance?
What is meant by generics in c#?
What is the adv of using System.Text.StringBuilder over System.String?
What is the example of predicate?
What is the process of delegation?
What is a private method in c#?
Is lazy thread safe c#?
What is asp net c# corner?
what is a structure in c#
what is be the overhead, if i use binary transmission. and will it be sent using xml text or how ?
What is the difference between overriding and overloading in systemverilog?
How do I format in c#?
What is difference between abstract class and interface in c#?
Do extension methods have to be static?
Write a sample code to write the contents to text file in c#?