what is the main differnce between const,readonly and static
Answer Posted / raja
1. we can initialize constant variable only at the
declaration where as readonly varaiable can be initialized
at either declaration or in constructor.
2. we can't use static modifier for the const variable
where as readonly variable can be declared as static
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What is the difference between list and array in c#?
Is it true that all c# types derive from a common base class?
Define an array?
What is signature c#?
What is null in database?
What are the different approaches of passing parameters to a method?
What is the difference between and xml documentation tag?
What are indexers in c# .net?
Explain the difference between the system.array.copyto() and system.array.clone()?
Does console.writeline() stop printing when it reaches a null character within a string?
Why do we use stringbuilder in c#?
What is form feed and carriage return?
What is the system namespace?
Why do we need encapsulation in c#?
Why do we use yield in c#?