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 / porchelvi.a

Constant:
--------
we have to initialize at the declaration itself
we could not change the value of constant variable.

Read only:
----------
we can not initialize the Read only variable during
declaration.we can initialize it in constructor only.after
that we could not change the value.Read noly is instance
based variable.

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can enum be null c#?

1099


How do you prevent a class from being inherited?

963


What is c sharp used for?

946


What is the difference between add and addrange in c#?

1048


Define thread?

1035


How to transpose multi-dimensional array?

1141


What is a factory in c#?

928


What is the difference between ienumerable and icollection?

992


What is the resgen.exe tool used for?

1031


What is icollection in c#?

966


What is the difference between var and dynamic types in c# 4.0?

1102


Are enums static c#?

1031


What are the types of parameters in c#?

1022


Are attributes inherited c#?

927


What is a generic class?

1018