TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
C# Coding Standard

Rule:  7@504

This rule is Obsolete
Synopsis:Use a struct when value semantics are desired
Severity Level:6
Category:Object oriented


More precisely, a struct should be considered for types that meet any of the following criteria:

  • Act like primitive types.
  • Have an instance size under ±16 bytes.
  • Are immutable.
  • Value semantics are desirable.

Remember that a struct cannot be derived from.