0

Possible Duplicate:
When to use struct in C#?

Why should we use class instead of structure

Community
  • 1
  • 1
hari
  • 1
  • You got the information in that other Q&A, but just for clarity: the question should really be the other way around: *When should we use struct instead of class?*. Making a class should be your default option. – Fredrik Mörk Mar 22 '11 at 12:54
  • You should use a struct when your design calls for pass-by-value and a class when your design calls for pass-by-reference. Yes, this is a useless answer, but it highlights the fact that there is no universally applicable rule, you have to make the decision in context of project-specific knowledge. – Ben Voigt Mar 22 '11 at 13:03

1 Answers1

0

Your question is a bit broad but normally but Microsoft gives good answers, http://msdn.microsoft.com/en-us/library/2hkbth2a(v=vs.80).aspx .

Johann du Toit
  • 2,609
  • 2
  • 16
  • 31