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

How do I publish my asp.net application to my isp's web server?

1020


What is the mvc model?

960


What is the Intermittent crashing of application in production?

1003


Is asp.net easy to learn?

962


Differentiate between namespace and assembly.

906


What is the difference between web.config and machine.config in ASP.NET?

1066


Please brief not about xsd,xslt & xml?

910


Describe how passport authentication works.

1057


Where session variables are stored?

925


What is the difference between sealed vs static class?

1027


How can you make sure that web api returns json data only?

922


Why is mvc better than asp.net?

996


How many types of sessions are there in asp net?

944


What is an asp.net web form?

1034


Why we are using mvc instead of asp.net? : Asp.Net MVC

977