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 difference between const, static and readonly?

Answer Posted / amit manekar

The difference is that static read-only can be modified by
the containing class, but const can never be modified and
must be initialized to a compile time constant. To expand on
the static read-only case a bit, the containing class can
only modify it:

in the variable declaration (through a variable initializer).

in the static constructor (instance constructors if it's not
static).

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is asp according to you?

1029


How can we create pie chart in asp.net?

1056


How can we provide the WebParts control functionality to a server control?

989


What is diff. Between abstract class and an interface?

1032


What kind of programming language is ASP.NET?

1132


How ASP and ASP.NET page works? Explain about asp.net page life cycle?

1023


Is there any property names “isnavigating”?

1031


What is asp.net master page?

975


Define satellite assemblies.

1043


Explain About WebService

1117


State differences between MVC and WebAPI

1124


Difference between Response.redirect vs server.transfer?

1169


Write the different features of a Thread and a Process?

1130


Which is faster viewbag or viewdata?

955


What is postback in asp net?

1037