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 ienumerable t in c#?
Is it possible to have different access modifiers on the get/set methods of a property?
What is asax file in c#?
Does c# have its own class library?
What do you mean by shared assembly?
List the difference between the virtual method and the abstract method?
When would you use generics in your code c#?
Is it possible to force garbage collector to run?
Is c# good for beginners?
How objects are stored in memory?
List down the different ide’s provided by microsoft for c# development.
What is the difference between integer and double?
What are jump statements in c#?
Explain how can you clean up objects holding resources from within the code?
What is bit in c#?