What is the difference between readonly and const

Answer Posted / vishnu

a read only
field can be initialized either in initialization or in
constructor

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is instantiating a class?

598


How to use the sreamReader class to read form a text file?

648


Do unused Namespaces in c# affect run-time performance?

594


What are access modifiers used for?

695


Explain the difference between abstract class and interface.

685






What is the difference between abstract and virtual?

545


Why static constructor is parameterless in c#?

676


What is difference between sleep () and wait ()?

573


What is string interpolation in c#?

623


What is thread in c#?

626


what is virtual method in c#?

809


Define satellite assembly in c#?

568


How to override a function in c#?

636


Could you explain the difference between func vs action vs predicate?

536


What are the two kinds of properties in c#.

601