I need to implement this scheme. But I face a warning
S3459: "Unassigned members should be removed".
This is a tutorial code:
private readonly IEngine engine; *S3459*
public void SomeMethod(int params)
{
this.engine.StartEngine(params);
}
Question: what exactly am I doing wrong?
CodePudding user response:
Your code:
private readonly IEngine engine;
expects an engine
to be initialized in the declaration or the constructor, because the field is