<分区>
Possible Duplicate:
Why should (or shouldn't) I prefix fields with 'm_' in C#?
我正在阅读干净的代码
有一段关于成员前缀。
作者建议不再使用 m_。 比如:
public class Part{
private String m_dsc;
void setName(String name){
m_dsc - name;
}
}
应该是:
public class Part{
String description;
void setDescription(String description){
this.description = description'
}
}
我的问题是,为什么我们之前使用 m_?
而且,本书以Java为例。 这个建议对 c# 有用吗? C++呢
谢谢!