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

Rule:  10@201

This rule is Obsolete
Synopsis:Use an enum to strongly type parameters, properties, and return types
Language:C#
Severity Level:6
Category:Data types


Description:

This enhances clarity and type-safety. Try to avoid casting between enumerated types and integral types.

Exception:

In some cases, such as when databases or PII interfaces that store values as ints are involved, using enums will result in an unacceptable amount of casting. In that case, it is better to use a const int construction.