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 singleordefault c#?
What is the difference between dll and lib?
What is a generic c#?
What is call back method?
What is the namespace for datatable in c#?
What is the use of 0 in c#?
What is callback function in c#?
What is c# entity framework?
What are the benefits of using windows services:
What is the predicate of a sentence?
Why delegates are type safe?
Explain About Iunknown interface Queue
Do we get an error while executing the “finally” block in c#?
What are regular expressions? Search a string using regular expressions?
What are the principles of delegation?