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
Why does dllimport not work for me?
What benefit do you get from using a primary interop assembly (pia)?
What is expression tree with example?
What are the types of methods in c#?
What is c# used for in the industry?
Compare and contrast between the System.Array.CopyTo() and Clone()?
Can we have multiple threads in one app domain?
What is meaning of type safety in c#?
What is the difference between writeline and write in c#?
What is concrete method in c#?
Which attribute is used in order that the method can be used as webservice?
Is there hashmap in c#?
What is strongly typed in c#?
What does char mean in c#?
What is the difference between values and reference types?