Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the difference between readonly and const

Answer Posted / chandan kumar

The read only keyword is different from the const keyword. A
const field can only be initialized at the declaration of
the field. A read only field can be initialized either at
the declaration or in a constructor. Therefore, read only
fields can have different values depending on the
constructor used. Also, while a const field is a
compile-time constant, the read only field can be used for
runtime constants as in the

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between a class and an object c#?

1036


What is constants in c#?

966


Why to use “finally” block in c#?

1186


Why static constructor is parameterless in c#?

1099


What does ienumerable mean?

974


What is enumerable in c#?

937


What is the difference between read and readline in c#?

993


Why is c# used?

976


What is difference between list and ilist in c#?

991


What are the main reasons to use c# language?

997


How to use nullable types in .net?

1045


Explain lock, monitors, and mutex object in threading.

953


What is default value of enum c#?

935


Why delegates are required?

1018


What is the difference between protected and internal in c#?

1090