Why is ReSharper suggesting readonly field for 'settings' in my example below?
If I understand correctly, you should use readonly
modifier if you change this field only in constructor, but in my example I also change it in another method in the same class.
What am I missing?
public partial class OptionsForm : Form
{
private Settings settings;
public OptionsForm(Settings s)
{
settings = s;
}
private void SaveData()
{
settings.ProjectName = TextBoxProject.Text;
}
}