Following are the key differences between them :-
√ Structure are value types and classes are reference types. So structures use
stack and classes use heap.
√ Structures members can not be declared as protected, but class members can
be. You can not do inheritance in structures.
√ Structures do not require constructors while classes require.
√ Objects created from classes are terminated using Garbage collector. Structures
are not destroyed using GC.
This blog is for .NET and related web technology, where you will find some really good and time saving answers which can help you to make your fundaas clear.
Monday, February 13, 2012
What is the difference between Class and structure’s ?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment