mSomeVar名称-来源和原因? [英] mSomeVar names - where from and why?
本文介绍了mSomeVar名称-来源和原因?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Android源代码中的变量以m
为前缀,例如mStream
或mHeaderValueIndex
.此处匈牙利表示法的依据是什么?
Variables in Android sources are prefixed with m
, like mStream
or mHeaderValueIndex
. What's the rationale behind Hungarian notation here?
推荐答案
"m"表示成员.这只是一种让您知道您正在处理类成员变量的方式.在其他环境或编程语言中,您可以改用下划线前缀.
The "m" is short for member. It's just a way of letting you know you're dealing with a class member variable. In other environments or programming languages, you might use an underscore prefix instead.
这篇关于mSomeVar名称-来源和原因?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文