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

What is difference between string and stringbuffer in c#?

906


What sort algorithm does c# use?

864


What is data type c#?

899


What is inumerable?

977


What is the function of the not null constraint?

909


Why we use extension methods in c#?

830


Why are strings in c# immutable?

893


What is Co- and Contra-Variance in C#?

931


What is call back method?

964


Are c# destructors the same as c++ destructors?

1046


What are the principles of delegation?

907


What is multithreading? What are the problems that comes with multithreading and how to manage them?

931


Enlist some of the properties of a thread class?

886


Why do I get an error (cs1006) when trying to declare a method without specifying a return type?

904


What are logical operators in c#?

910