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

Answer Posted / xiaof

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 as in the following example:
public static readonly uint l1 = (uint) DateTime.Now.Ticks;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is remote data?

835


What is the difference between a private assembly and a shared assembly?

1007


What is static variable in c#?

959


What is a private method in c#?

1046


What does it mean to override a method?

990


What are the collections in c#?

896


Is c# different than c++?

893


What is different between Static Constructor and Private Constructor?

1000


What language is c# similar to?

926


Can you instantiate an abstract class c#?

904


How objects are stored in memory?

1030


What is a concrete class in c#?

983


What is private void in c#?

923


How do I register my code for use by classic com clients?

892


Do loops in c#?

900