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

Rule:  3@108

This rule is Obsolete
Synopsis:Name an identifier according to its meaning and not its type
Language:C#
Severity Level:6
Category:Naming


Description:

Avoid using language specific terminology in names of identifiers.

Example:

Do not use a definition like: void Write(double doubleValue);

Instead, use: void Write(double value);

If it is absolutely required to have a uniquely named method for every data type, use Universal Type Names in the method names. The table below provides the mapping from C# types to Universal types.

C# TYPE NAMEUNIVERSAL TYPE NAME
sbyteSByte
byteByte
shortInt16
ushortUInt16
intInt32
uintUInt32
longInt64
ulongUInt64
floatSingle
doubleDouble
boolBoolean
charChar
stringString
objectObject

Based on the example above, the corresponding reading methods may look like this:

double ReadDouble();
long ReadInt64();