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

Write the syntax for catching an exception in c#?

848


What is the default value of datetime in c#?

908


Int map to which .net types?

968


How can you sort strings in array that are passed to method as arguments?

912


How do I do implement a trace and assert?

936


What is the difference between returning iqueryable vs ienumerable?

898


Explain streamreader/streamwriter class?

938


What is the components of window?

849


What are circular references?

884


What are different types of classes in c#?

845


Can you describe iuknown interface in short?

1079


What is boolean method?

900


What is different between Implicit conversion and Explicit conversion in C#?

964


What is an assembly loader?

886


Is namespace necessary in c#?

860