What is the Difference between read only and constant
variables?

Answer Posted / isaiselvan

readonly assign a value at run time but we can assign a declaration part.
const values assign only at declaration part.

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how to implement an object pool in c#.net

707


What is array class in c#?

618


What is bit in c#?

729


What is data binding c#?

708


How does aspect oriented programming work?

722


What is meant by clr?

755


What is c sharp used for?

667


To create a localized application which namespaces are necessary?

736


How do you declare a method in c#?

665


Why we use get and set property in c#?

690


What is difference between arraylist and list in c#?

611


Which compiler switch creates an xml file from xml comments in the files in an assembly?

789


Why use a singleton instead of static methods?

633


Describe ways of cleaning up objects in c#.

682


Illustrate the differences between the system.array.copyto() and system.array.clone()?

704