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

Can I do things in il that I can't do in c#?

871


Is int an object in c#?

854


What does == mean in c sharp?

931


what are some characteristics of an array?

899


Does c# support properties of array types?

883


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

837


What is difference between class and interface in c#?

864


What is an Interface in C#?

929


What is the diff between the System.Array.CopyTo() and System.Array.Clone()?

947


What is response redirect in c#?

848


What does return do in for loop?

872


Compare and contrast between the System.Array.CopyTo() and Clone()?

923


Can we have static indexer in c#?

851


Are private members inherited in c#?

918


hi, is compulsory .net knowledge need for biztalk server training. if need, how far?.tell me some info abt real time instructors in hyd or other?

1501