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 the use of ienumerable?
Are all methods virtual in c#?
List the two important objects of ado.net and also list the namespaces that are commonly used in ado.net to aid in connection to a database.
Why do we use namespace in c#?
Why is c# good for games?
How to sort an int array in c#?
Which are the loop types available in c#?
How many types of constructors are there?
How many bytes is a char c#?
What is difference between association, aggregation and inheritance relationships?
What is the use of static members with example using c#.net.
What is the value which is accepted by all data types ?
What are the different types of delegation?
What is the purpose of static?
How Is The Dll Hell Problem Solved In .net?