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

Explain what are the steps for creating clr trigger?

904


What is a deadlock lock?

929


Can you put two constructor with the same structure in a class?

915


Can a struct inherit from an interface in c#?

1019


What is thread and explain states of a thread in c#?

868


What is xaml file in c#?

959


Is as keyword in c#?

879


Enlist all the components of an ado.net framework?

877


What is the difference between list and ilist in c#?

884


What is a linq in c#?

884


What is the difference between an application domain and a process?

1039


Is unboxing an implicit conversion?

1029


Why do you need boxing in c#?

918


Is goto statement supported in c#?

938


Can constructor be protected in c#?

946