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 b/w Readonly Variable and Constant
Variable?

Answer Posted / niranjan

The readonly keyword differs from the const keyword. A
const field can only be initialized at the declaration of
the field. A readonly field can be initialized either at
the declaration or in a constructor. Therefore, readonly
fields can have different values depending on the
constructor used. Also, although a const field is a compile-
time constant, the readonly field can be used for run-time
constants, as in this line: public static readonly uint l1
= (uint)DateTime.Now.Ticks;

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How a base class method is hidden?

1016


What are the technology areas that microsoft.net contains?

952


Explain jit?

993


What are the features present in vb 2005?

978


Why do you need Lock in Visual Basic?

1051


Explain the difference between system.string and system.stringbuilder classes?

917


Explain the use of console application?

917


What is global assembly cache (gac)?

948


What is late binding and early binding?

1001


What is the differnce between managed code and unmanaged code?

943


Write a program to find all text files in a logical drive and return the count of the number of files?

2657


What is the significance of delegates?

887


Explain option strict?

887


Can you please explain the difference between dataset and datareader?

969


What are the assembly entry points?

965