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 / komilla shaheen

const is the keyword where we can intialize the variable
with some value which is constant throughout the program it
cannot be changed.
static is the keyword which is intialized at complile time
and had to change at compile time only.
readonly is for the varible which is readonly cant be
changed.

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by object pooling?

1117


How are delegates chosen?

943


Explain About delegates

1083


Explain the difference between the system.array.copyto() and system.array.clone()?

976


How long can a string be c#?

960


Explain the difference between passing parameters by value and passing parameters by reference with an example?

989


What is the function of the not null constraint?

989


What are data types with examples?

1033


Is an array an object c#?

989


Is an interface a type c#?

1007


Can we override interface methods in c#?

905


Why are c# strings immutable?

1050


What are the Types of assemblies that can be created in dotnet

1210


Explain About multi level and multiple inheritance how to achieve in .net

1090


What are c# i/o classes? What are the commonly used i/o classes?

972