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
Are structs value types c#?
Write down the c# syntax to catch an exception
Which is faster list or dictionary in c#?
Is string a primitive data type in c#?
What is jit? What are the different types of jit?
What is event and delegates in c#?
How big is int16?
Is an array an object c#?
What is static classes in c#?
How can encapsulation be achieved?
What is Named parameter in C#?
What is session management in c#?
What is a class in unity?
What is Dependency of Injection?
How many types of constructor are there in c#?