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 are the differences b/w structure and class?

Answer Posted / kiran

Following are the key differences between them :-
1. Structure are value types and classes are reference
types.So structures use
stack and classes use heap.
2. Structures members can not be declared as protected ,
but class members can
be.You can not do inheritance in structures.
3. Structures do not require constructors while classes
require.
4. Objects created from classes are terminated using
Garbage collector.Structures are not destroyed using GC.

Is This Answer Correct ?    14 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to properly clean up excel interop objects?

984


Can struct inherit from class c#?

1030


What is a collection in c#?

952


What is inheritance in csharp?

1063


Describe how a .net application is compiled and executed

975


What does ienumerable mean?

974


What language do desktop applications use?

994


Is type nullable c#?

975


Why array is faster than arraylist in c#?

1036


How long does it take to learn c# programming?

965


Explain About disco and uddi

1185


Define a strong name in .net?

1038


Can we override static class in c#?

949


Explain the Usage of web.config

1039


How can I develop an application that automatically updates itself from the web?

951