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

What is generic in c#?

867


Are value types sealed?

991


How to assign Null value to Var?

989


Why use “using” in c#?

966


Explain the types of errors in c#?

908


How long will it take to learn c#?

970


Are objects passed by reference in c#?

1002


If you define a user defined data type by using the class keyword, is it a value type or reference type?

889


What is a callback c#?

1008


What is instantiating a class in c#?

1042


How do you declare an interface in c#?

927


Which of these string definitions will prevent escaping on backslashes in c#?

1016


Explain the different types of delegates used in c#.

949


Why is c# used?

931


What is a helper method in c#?

939