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
How do I publish my asp.net application to my isp's web server?
What is the mvc model?
What is the Intermittent crashing of application in production?
Is asp.net easy to learn?
Differentiate between namespace and assembly.
What is the difference between web.config and machine.config in ASP.NET?
Please brief not about xsd,xslt & xml?
Describe how passport authentication works.
Where session variables are stored?
What is the difference between sealed vs static class?
How can you make sure that web api returns json data only?
Why is mvc better than asp.net?
How many types of sessions are there in asp net?
What is an asp.net web form?
Why we are using mvc instead of asp.net? : Asp.Net MVC