[RESOLVED] What does this warning mean?
What does this warning mean? And how can i fix it?
Code:
Warning 1 'MY_Namspace.MainForm.Load()' hides inherited member 'System.Windows.Forms.Form.Load'. Use the new keyword if hiding was intended.
This is my load method:
Code:
private void Load()
{
settings.LoadXml();
txtDisplay.Text = settings.Display;
txtName.Text = settings.Name;
txtTopic.Text = settings.Topic;
settings.LoadTo(txtTo.Text);
settings.LoadBody(txtBody.Text);
}
Thanks.
Re: What does this warning mean?
Never mind i figured out why. Apparently i cant use the name load.
Re: What does this warning mean?
Quote:
Originally Posted by Pale
Never mind i figured out why. Apparently i cant use the name load.
You can if you want to replace the inherited Load method. If you do declare it as:
Code:
private new void Load()
In your case, perhaps LoadSettings( ) will be more appropriate?