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

Answer Posted / chandan kumar

The read only keyword is different from the const keyword. A
const field can only be initialized at the declaration of
the field. A read only field can be initialized either at
the declaration or in a constructor. Therefore, read only
fields can have different values depending on the
constructor used. Also, while a const field is a
compile-time constant, the read only field can be used for
runtime constants as in the

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between static class and sealed class in c#?

927


What is the difference between constants and read-only?

915


What is a console application in c#?

956


What are the advantages of generics in c#?

906


How many aware interfaces are there?

926


How do you create dlls in .NET

1049


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

983


What is difference between hashtable and dictionary in c#?

952


If a class derives from another class, will the derived class automatically contain all the public, protected, and internal members of the base class?

965


Explain constructor in c#?

1321


Is c# and c same?

892


What are the 3 different types of arrays?

1027


explain the features of static/shared classes.

942


What is a generic in c#?

923


What are strongly typed objects?

927