public class SomeClass
{
private readonly AuthenticationService _authenticationService = null;
private readonly ProfileService _profileService = null;
public SomeClass(IAuthenticationService authenticationService, ProfileService profileService)
{
_authenticationService = authenticationService;
_bgMeterProfileService = bgMeterProfileService;
}
...
正在使用_varName为专用变量C#命名建议需要
这是私有变量和构造参数之间进行区分。
就想,把这个代码的开放,看看是否有更好的方法来区分私有变量和方法参数
http://blogs.msdn.com/b/brada/archive/2005/01/26/361363.aspx 上述建议(2.6命名)也是如此。 将此标记为已接受的答案。感谢 –