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 asp according to you?
How can we create pie chart in asp.net?
How can we provide the WebParts control functionality to a server control?
What is diff. Between abstract class and an interface?
What kind of programming language is ASP.NET?
How ASP and ASP.NET page works? Explain about asp.net page life cycle?
Is there any property names “isnavigating”?
What is asp.net master page?
Define satellite assemblies.
Explain About WebService
State differences between MVC and WebAPI
Difference between Response.redirect vs server.transfer?
Write the different features of a Thread and a Process?
Which is faster viewbag or viewdata?
What is postback in asp net?