what is the main differnce between const,readonly and static
Answer Posted / komilla shaheen
const is the keyword where we can intialize the variable
with some value which is constant throughout the program it
cannot be changed.
static is the keyword which is intialized at complile time
and had to change at compile time only.
readonly is for the varible which is readonly cant be
changed.
| Is This Answer Correct ? | 9 Yes | 1 No |
Post New Answer View All Answers
Define Final Class in C#
What does immutable mean in c#?
What is difference between var dynamic and object in c#?
What is the difference between iqueryable and ienumerable?
What does question mark mean in c#?
Why do we use class in c#?
What is the difference between int and int in c#?
How to exclude a property from xml serialization?
Why would you use a class property in c#?
Why do we use delegates?
What exception can an overridden method throw in comparison with the method it is overriding?
What is the difference between internal and private in c#?
Are objects passed by reference in c#?
What is xml document how do you open it?
Can we create instance of private class in c#?