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 is application management and maintenance improved in asp.net 2.0?

543


Which is an advantage of application service providers?

495


Explain program to call the js function when the change is being made in the dropdown list made in asp.net mvc? : asp.net mvc

530


When using the Pager object, inorder to know which page to go, which property you have to set to grid?

565


explain code with datachaching with example

1699






What is http pipeline in asp.net?

516


Define dll hell?

631


Can you dynamically assign a Master Page?

590


What are the components of ado.net?

537


What are tuples?

543


What is virtual directory in asp.net?

514


What is the function used for removing an event listener?

551


What would be salary for 8+ years of experience in ASP.NET in different metro city in india?

1990


How can we use Web API with ASP.NET Web Form?

650


In early binding will the method invoked on com component will verify it?s existance in the system or not ?

2142