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

Can a child class call the constructor of a base class?

1005


What are the concepts of dispose method?

886


Can property be private in c#?

838


What do you understand by the terms datareader object and dataset object?

928


What is the difference between abstract class and interface in c#?

913


How long will it take to learn c sharp?

897


what is the purpose of using statement in c#

970


How do you create dlls in .NET

1020


Can you inherit from a static class in c#?

900


Define thread?

935


Tell me the difference between call by value and call by reference.

939


What is the base class for array types?

1011


What is the main method in c#?

1015


What's the difference between an integer and int?

1007


What do you mean by generic class in c#?

886