public class SomeClass
{
private readonly AuthenticationService _authenticationService = null;
private readonly ProfileService _profileService = null;
public SomeClass(IAuthenticationService authenticationService, ProfileService profileService)
{
_authenticationService = authenticationService;
_bgMeterProfileService = bgMeterProfileService;
}
...
プライベート変数に _varName を使用しています
これは、プライベート変数とコンストラクター パラメーターを区別するためです。
プライベート変数とメソッド パラメータを区別するより良い方法があるかどうかを確認するために、このコードを公開したいと考えました。