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 happens if you inherit multiple interfaces and they have conflicting method names?

477


What are regular expressions? Search a string using regular expressions?

502


Why do we need to override in c#?

514


Is c# different than c++?

506


How do you clear a list in c#?

484






What are the three types of operators?

459


What are the main reasons to use c# language?

488


Can you drink alcohol with a loop recorder?

487


Explain clr in brief.

542


How do destructors and garbage collection work in c#?

523


Define xslt.

536


List down the different ide’s provided by microsoft for c# development.

465


What is the and operator in c#?

473


Which is faster hashtable or dictionary?

490


Can you declare a field readonly?

526