Saturday, August 11, 2012

Classes Vs Structure

Below are differences between Class & Structure
1) Class are reference type but struct are vaslue type.
2) Class are comes in inheritance but struct not.
3) A struct can't be abstract but class can.
4) One can't initialized the variable in struct.
5) Fields are automatically initialized with classes.
6) A struct can't be null.

No comments:

Post a Comment