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 do session tokens work?

506


Suppose you want an asp.net function (client side) executed on the mouseover event of a button. Where do you add an event handler?

556


Explain security types in asp.net?

533


What is the difference between localization and globalization?

552


List the advantages and disadvantages of user control an custom control?

527






What is the difference between mvc and asp.net? : Asp.Net MVC

470


What is x xss protection?

558


Error : The operation couldn’t be performed because ole db provider sqlncli10 for linked server was unable to begin a distributed transaction.00000110 oledb provider for linked server returned message the partner transaction manager has disabled its support for remote/network transactions. I can able to execute the stored procedure in sql server but when i run the web page getting error like above. I did all the configuration. what is the solution?

1895


What is IPostBack? How to use it?

588


What is http pipeline in asp.net?

509


To get the values in two different controls to match which control you use it?

524


What is advantage of asp.net?

539


Explain the difference between asp.net mvc and asp.net webforms

563


What are html helpers in asp.net?

517


What are user controls?

561