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 does the clr work?

922


What is boolean conditions in c#?

972


What is the difference between abstract class and interface in c#?

967


What are modifiers in c#?

881


Explain the role of the datareader class in ado.net connections?

913


Difference between Value type & reference types ? and give the example in .Net?

949


Explain about CTS?

968


What is use of a HashTable in .NET?

1156


How many bytes is an int in c#?

943


Explain manifest & metadata in c#.

1018


Is xml tags are case sensitive?

897


What is a custom attribute?

903


What are static and dynamic variables?

1167


Are c# generics the same as c++ templates?

940


What is difference between singleordefault and firstordefault?

919