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 main differnce between const,readonly and static

Answer Posted / raja

1. we can initialize constant variable only at the
declaration where as readonly varaiable can be initialized
at either declaration or in constructor.

2. we can't use static modifier for the const variable
where as readonly variable can be declared as static

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ienumerable t in c#?

809


Is it possible to have different access modifiers on the get/set methods of a property?

941


What is asax file in c#?

893


Does c# have its own class library?

913


What do you mean by shared assembly?

1012


List the difference between the virtual method and the abstract method?

834


When would you use generics in your code c#?

864


Is it possible to force garbage collector to run?

845


Is c# good for beginners?

838


How objects are stored in memory?

926


List down the different ide’s provided by microsoft for c# development.

827


What is the difference between integer and double?

859


What are jump statements in c#?

884


Explain how can you clean up objects holding resources from within the code?

861


What is bit in c#?

924