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
If c# destructors are so different to c++ destructors, why did ms use the same syntax?
If a method's return type is void, can you use a return keyword in the method?
Explain how to add controls dynamically to the form using c#.net.
Is static thread safe?
How we can create an array with non-default values?
Explain the access modifiers in c#?
How many types of variables are there in c#?
Explain the difference between Metadata and Manifest
What are tuples c#?
Does c# have a 'throws' clause?
what is the index value of the first element in an array?
What is args c#?
What is concatenation and when should it be used?
What is COM Interoperability?
Can constructor be private c#?