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

What is break mode? What are the options to step through code?

1054


Write a program that would find the nth term of a geometric progression, given the value of first term and common ratio. Any inbuilt function that the language provides for calculating exponent should not be used.

3535


Explain the difference between web.config and machine.config and where it will be ?

925


What is jagged array in vb.net?

1084


What is the class that allows an element to be accessed using unique key?

1129


Explain what observations between vb.net and vc#.net?

957


Explain about garbage collection?

991


So you know which dll is used for microsoft .net run time?

973


Described strong typing and weak typing?

1056


What is normal jit?

1049


What are jagged arrays ?

1045


Explain about the feature anonymous type?

991


What is the use of system.diagnostics.process class?

1057


Explain the use of new keyword?

926


What are jagged arrarys ?

976