what is difference between const, static and readonly?
Answer Posted / amit manekar
The difference is that static read-only can be modified by
the containing class, but const can never be modified and
must be initialized to a compile time constant. To expand on
the static read-only case a bit, the containing class can
only modify it:
in the variable declaration (through a variable initializer).
in the static constructor (instance constructors if it's not
static).
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is base class of .net?
What is a web farm?
What is the benefit of WebAPI over WCF?
How can we identify that the page is post back in asp net?
How we implement the multiple paypal value with gridview in my website and how we make a payment through Credit Card.
What is virtual directory in asp.net?
Describe paging in asp.net?
Explain the difference between inline and code behind - which is best in?
Explain the namespace classes used in asp.net mvc? : asp.net mvc
How do I open an ashx file in windows 7?
How many types of cookies are there in asp.net?
how can create login from create and written conde in asp.net
About CLR, reflection and assemblies?
Write a code for sending an email from asp.net application.
what is command line compiler.what are the steps and how it is related to debugging.