A New Internet Library: Add Your Website/Blog or Suggest A Website/Blog to our Free Web Directory http://anil.myfunda.net.

Its very simple, free and SEO Friendly.
Submit Now....

Thursday, April 17, 2008

What is the difference between Class and structure’s ?

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.

No comments:

Post a Comment

Post your comments here:

Dotnet-Interviews