|
-
August 10th, 2008, 02:51 PM
#1
[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.
Last edited by Pale; August 10th, 2008 at 06:08 PM.
-
August 10th, 2008, 03:41 PM
#2
Re: What does this warning mean?
Never mind i figured out why. Apparently i cant use the name load.
-
August 10th, 2008, 03:47 PM
#3
Re: What does this warning mean?
 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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|