I've been having a problem with the exception handling and catching, what is wrong with te following code? It is the load for a form in my app.
This is the code:
private void NewRouter_Load(object sender,System.EventArgs e)
{
try
{
string settings = "settings.xml";
XmlDocument xd = new XmlDocument();
if (settings != null)
{
// uitlezen van xml gegevens
xd.InnerXml = settings;
}
MessageBox.Show("succes!"
// this.textRouterIP.Text="hello";
}
catch(Exception e)
{
MessageBox.Show(e.Message);
}
}
It gives back the errors:
[C# Error] NewRouter.cs(208): A local variable named 'e' cannot be declared in this scope because it would give a different meaning to 'e', which is already used in a 'parent or current' scope to denote something else
[C# Error] NewRouter.cs(210): 'System.EventArgs' does not contain a definition for 'Message'
Some help please!? ;-)
Thanks in advance...
- Raenius
"Free will...is an illusion"
This is the code:
private void NewRouter_Load(object sender,System.EventArgs e)
{
try
{
string settings = "settings.xml";
XmlDocument xd = new XmlDocument();
if (settings != null)
{
// uitlezen van xml gegevens
xd.InnerXml = settings;
}
MessageBox.Show("succes!"
// this.textRouterIP.Text="hello";
}
catch(Exception e)
{
MessageBox.Show(e.Message);
}
}
It gives back the errors:
[C# Error] NewRouter.cs(208): A local variable named 'e' cannot be declared in this scope because it would give a different meaning to 'e', which is already used in a 'parent or current' scope to denote something else
[C# Error] NewRouter.cs(210): 'System.EventArgs' does not contain a definition for 'Message'
Some help please!? ;-)
Thanks in advance...
- Raenius
"Free will...is an illusion"