Translate

Sunday, October 6, 2013

Difference between class and struct C#

class
struct
Reference type
Value Type
Cannot have explicit parameter less constructor
If you define constructor, then all the fields must be initialized, in the constructor.
Cannot have finalizer.

Cannot have field initializers
Supports Inheritance
Does not support inheritance



No comments:

Post a Comment

Comments will appear once they have been approved by the moderator