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 / nishant vishwakarma

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, while a const field is a compile-time constant, the readonly field can be used for runtime constants

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

922


What is the importance of a Button control?

1268


Define cls?

974


What is datatype conversion?

1054


Can you please explain the difference between dataset and datareader?

981


Can you please explain the difference between namespace and assembly?

973


How do you define a read only property in a class module?

882


Explain how can we remove handlers at run time?

959


what is difference between web.config and machine.config and where it will be ?

893


What are the differences between c# and visual basic.net?

985


Explain nested classes?

917


Why should you use delegate?

870


Explain about delegate?

847


How do you use two datareaders at the same time in a vb.net windows application ?

1013


Explain about garbage collection?

952