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 main differnce between const,readonly and static

Answer Posted / vijay rana

const is used to create a constant value which will be
constant throuout the class

static is used for a commaon variable for all objects, it is
not part of a object, it is a part of class, every object
will share this value,
read,

there are many situation in which we want to intialize the
value of a constat variabl at run time, in which we can have
different values for different objects, with the help of
readonly we can define the value of any object at runtime
which will not be changed later

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use partial class in c#?

823


What's the c# syntax to catch any possible exception?

956


What is iqueryable?

854


Define collections?

880


Can mvc be used for desktop applications?

903


What is private and shared assembly?

937


Hello! How to do this: "Create manifest utility intended for creating update content files. Application should take a set of files as input parameter and generate XML based manifest file as output one." I use C# and vs.net 2003. It's urgent! Help please, thanks. Mayana

1874


Is c and c# the same?

856


How do I open the console?

935


In c#, what will happen if you do not explicitly provide a constructor for a class?

906


Is c sharp open source?

813


What is the adv of using System.Text.StringBuilder over System.String?

914


How do you specify a custom attribute for the entire assembly?

885


What is the difference between integer and double?

860


if we are updating a database using thread, and mean while application crashes or thread being aborted then what will happen in Database? Rollback or Database will be updated? Please explain with different scenario.

2354