Readonly vs. const?

Answer Posted / j_baghla

Both are used for constant values but in readonly variable
we can assign the value thru expression but we can't assign
value to constant variable thru expression.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is deferred execution vs. Immediate execution in linq?

567


What is the difference between "using system.data;" and directly adding the reference from "add references dialog box"?

621


Define marshling?

592


What are the different types of remote object creation mode in .net?

575


Explain how do assemblies find each other?

575






Explain me difference between public and static modifiers?

517


What is garbage collection in .net? Explain the garbage collection process?

566


What is a garbage collector?

622


Tell me about secure socket layer? How to make use of the technology?

548


What is the procedure to add assemly to gac to make it shared one?

511


How we can achieve Connection pooling in .Net?

645


What's the .net collection class that allows an element to be accessed using a unique key?

565


What is .net and why it is used?

536


What is the need of OLE-automation?

635


Explain me what is the .net framework and how does it work?

561