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 are native functions?
Does c# support properties of array types?
Where is the main method in c#?
What is int32 maxvalue?
Which of these string definitions will prevent escaping on backslashes in c#?
Does c# support multilevel inheritance?
Explain concurrency with aop?
What is .dbml file?
Can hashtable have duplicate keys?
What kind of the information stored inside the assembly?
Why is main static in c#?
Explain static class members.
What is difference between dictionary and list in c#?
explain the features of static/shared classes.
What is the difference between struct and class c#?