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

Answer Posted / vathsala

A quick synopsis on the differences between 'const'
and 'readonly' in C#:

'const':
1.Can't be static.
2.Value is evaluated at compile time.
3.Initiailized at declaration only.

'readonly':
1.Can be either instance-level or static.
2.Value is evaluated at run time.
3.Can be initialized in declaration or by code in the
constructor.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to use nullable types in .net?

938


What does int parse do in c#?

880


What is the use of ienumerable?

825


What is the difference between writeline and write in c#?

790


What is session management in c#?

911


Is constructor a static method?

940


explain the three services model commonly know as a three-tier application.

928


What is out int in c#?

840


Assembly Code. in Rejester AL. How do Contast Replece( or Change): Bit D3 With Bit D4 and Bit D2 With Bit D5 and Bit D1 With Bit D6 and Bit D0 With Bit D7 I am Not Know Very Well Write English.

1832


How do you create dlls in .NET

1003


What is the concept of strong names?

921


Is c# scripting language?

846


how to insert the data from the grid view to database table though button click.pls send the answer to mail id suri1319@gmail.com

1868


How many types of polymorphism are there?

886


What is the use of base keyword? Tell me a practical example for base keyword’s usage?

851