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 read only and constant
variables?

Answer Posted / vijay bhaskar semwal

some more difference
Unlike const, when using readonly, the value is set when
the instance is created. This means that you can specify
the value of the readonly in the constructor of your class.

Another difference between const and readonly, is that
const are static by default, where with readonly, you must
define it as static (if you want it to be).

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the fundamental principles of oo programming?

1050


What is using keyword in C#?

979


What is public or shared assemblies ?

951


What is the difference between throw and throw ex?

820


What is the process of Serialization?

952


Explain About sn.exe

912


Difference between type constructor and instance constructor? What is static constructor, when it will be fired? And what is its use?

1005


Why do we use stringbuilder in c#?

877


What is type safe in c#?

835


What is default boolean value in c#?

916


What are sorted lists?

853


What is a thread c#?

867


What is “using” statement in c#?

950


What is a three-tier application.

989


What does == mean in c sharp?

931