It depends.
Is it significant enough to add the description of the data type in variable/object name in your method/class?
System Hungarian Notation > Apps Hungarian Notation
If you are designing in procedural language (e.g. C) that has many of global variables or/and lower-API that deals with precise data types and sizes (e.g. C's<stdint.h>
where 40+ different data type notations are used to describe int
), System Hungarian Notation is more helpful.
Note, however, many modern programmers consider adding type information in variable name is abundant as many of modern IDEs have very convenient tools (e.g. Outline of Eclipse, Symbol Navigator of Xcode, Visual AssistX of Visual Studio, etc.). System Hungarian Notation was widely used in the earlier ages in programming (e.g. FORTRAN, C99) when type information was not readily available as a tool of the IDEs.
System Hungarian Notation < Apps Hungarian Notation
If you are working in higher-level class or method (e.g. user-defined driver class/method for your C# application), notating simple data type may not be sufficient enough to describe the variable/object. Therefore, we use Apps Hungarian Notation in this case.
For example, if the purpose of your method is to retrieve executable path and to display an error message if not found, instead of noting that it is a type of string
, we note more significant information to describe the variable/object for programmers to better comprehend the purpose of the variable/obejct:
private string mPathExe;
private string msgNotFound;