An interesting detail about variable name

浪子不回头ぞ 提交于 2019-12-04 08:03:24

The m will be to signify that the object is a member variable of the class in question. It's a common use of Hungarian Notation to prefix the name with clues to the variable's purpose or type.

To those of us who disapprove of cluttering up our variable names with such characters, they're known as "warts". In my opinion, with today's IDEs it is better to leave the warts off, because we can readily distinguish between local variables and member variables without their help.

Many programmers like to prefix their variables with lowercase letters that represent the object type that variable represents. For example:

var strMyString = new String();

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!