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
What is thread.sleep()?
Is null in c#?
Can we have multiple constructors in a class c#?
How can an inner class access the members of outer class?
What is difference between value and reference types in C#.NET
Why we use extension method in c#?
What does m mean in decimal c#?
Why do we use parameters in c#?
code for arranging given number in possible permutation ways ex:123,321,312,132,231,213.
What is a Command Object in C#?
What is clr namespace?
What is namespace in oops?
What is the difference between finalize() and dispose()?
Why do we use public static void main in c#?
How to use reflection to call generic method?