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 read only and constant
variables?

Answer Posted / kishore maddineni

all above answers are correct.But there is another point.

readonly variable can be assigned at declaration or at run
time which is must be in constructor. Readonly value can't
be modified.

Constant variable must be assigned at the time of
declaration only ,which is can't be modified.

Is This Answer Correct ?    36 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do u mean by delegation?

890


What is difference between Trace and Debug

1029


Write a console application and implement the ternary operator to decide whether the age a user entered after being prompted is allowed to vote or not(given that only citizens between 18 and 120 years only inclusive can vote). Use exception handling for non-numerical input.

2297


Define an assembly in .net?

922


Why do we need interfaces in c#?

852


What is definition in c#?

831


Why do we override in c#?

837


What is a linked list c#?

852


Describe ways of cleaning up objects in c#.

852


Is datetime value type c#?

829


1. Describe page life cycle?

2059


How can it prevents DLL Hell assembly versioning in .NET?

985


What is hashmap in c#?

898


What are the different approaches of passing parameters to a method?

927


How do you mark a method obsolete?

961