The method or operation is not implemented

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I took the code from here and tweaked it to our needs. One of the methods is
erroring out throwing an exception and I'm not sure why:

object IConfigurationSectionHandler.Create(object parent, object
configContext, XmlNode section)

{

throw new Exception("The method or operation is not
implemented.");

}

When I run all my code, the exception above is thrown.

My code:

http://www.webfound.net/forum_posts/method_not_implemented_error.JPG

http://www.webfound.net/forum_posts/method_not_implemented_error.txt
 
Your code is registering an event handler for "Create" and in that handler
you are throwing that exception everytime that event is invoked.

The IDE puts this "throw new Exception("The method or operation is not
implemented."); " in there for you, so you don't forget to implement your
event handler.

If you don't care about the event, either remove the section where you
register the handler, or comment out the "throw new Exception("The method or
operation is not
implemented.");" part.

-Corey
 
Dude! The method is throwing the exception because the code in the method is
code to throw the exception!

You need to replace the code with your own code that performs the Create
implementation for your class.

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

Expect the unaccepted.
 
I don't understand what this actually is for

object IConfigurationSectionHandler.Create(object parent, object
configContext, XmlNode section)
{
throw new Exception("The method or operation is not
implemented.");
}

and what object is...

I'm new to C#...so stay with me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top