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

Rule:  10@202Checked automatically with code checker

This rule is Obsolete
Synopsis:Use the default type Int32 as the underlying type of an enum unless there is a reason to use Int64
Severity Level:5
Category:Data types


If the enum represents flags and there are currently more than 32 flags, or the enum might grow to that many flags in the future, use Int64.

Do not use any other underlying type because the Operating System will try to align an enum on 32-bit or 64-bit boundaries (depending on the hardware platform). Using a 8-bit or 16-bit type may result in a performance loss.