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

Rule:  7@504

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


Description:

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.