If you consider using Properties.Settings.Defaultinside a class as a dependency and therefore introduce it?
eg:.
public class Foo
{
private _settings;
private bool _myBool;
public Foo(Settings settings)
{
this._settings = settings;
this._myBool = this._settings.MyBool;
}
}
.
,
or do you think use Settingsas a global global practice is good practice?
eg:.
public class Foo
{
private bool _myBool;
public Foo()
{
this._myBool = Properties.Settings.Default.MyBool;
}
}
source
share