Difference Between ReadOnly and Constant Variable in
compile time and Run Time.

Answer Posted / kamlesh sharma

readonly variables are can be initilized at compile time
but we can assign values to readonly varialble at once
through functions or constructors

but in case of constant variables once assign a value we
can't change value and must assign value to constant
variables at the time of declarition

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does a web application session work?

554


how can create login from create and written conde in asp.net

1774


Mention few asp.net validators.

571


Describe how to implement globalization and localization in the use interface in .net.

558


Can a .net web application consume java web service?

510






Which of the following .NET framework supports Web API?

634


Which object is used to encapsulate the state of the client and the browser in ASP.NET?

588


Explain the concept of event bubbling in ASP.NET?

578


What is http post action?

538


What is localhost in asp.net?

563


What are the steps involved to fill a dataset?

550


What are the different web pages?

493


What is global.asax file used for?

555


Who can consume WebAPI?

587


Can we create a multiple user simultaneously ?

580