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 do you understand by aggregate dependency?
What are custom controls?
What is difference between abstract class and an interface?
What is the difference between rest and restful?
How does session state work in asp.net?
What is the difference between ASP Session State and ASP.Net Session State?
Which is an advantage of application service providers?
What is bson in web api?
How ASP.NET page works?
How to you can limit Access to Web API to Specific HTTP Verb?
Explain Features in ASP.NET
If iam developing an application that must accomodate multiple security levels though secure login and my asp.net web appplication is spanned across three web-servers (using round-robbin load balancing) what would be the best approach to maintain login-in state for the users?
What is the benefit of WebAPI over WCF?
What is the importance of aspnet_isapi.dll, inetinfo.exe andaspnet_wp.exe in the page loading process.
What is asp.net master page?