4 Replies - 4991 Views - Last Post: 13 September 2011 - 05:16 PM Rate Topic: -----

#1 obhasha07  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 21-August 11

How to fix the System.InvalidOperationException error?

Posted 13 September 2011 - 04:23 PM

When I try to run my VB.net 2010 project I get the error.

"System.InvalidOperationException occured in PCDoctor.exe

Additional Inormation: An error occured creating the form. See Exception.InnerException for details. The error is: Conversion from string "" to type Double is not valid.

I even tried placing break points in the startup form but this error happens before any of the startup form code is excecuted.

The project was working fine before I added code to a form. I even removed this new code and tried to run the project. but still doesn't work.

Please help!!!

Is This A Good Question/Topic? 0
  • +

Replies To: How to fix the System.InvalidOperationException error?

#2 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2271
  • View blog
  • Posts: 9,499
  • Joined: 29-May 08

Re: How to fix the System.InvalidOperationException error?

Posted 13 September 2011 - 04:40 PM

What Double is the string value ""?
Was This Post Helpful? 0
  • +
  • -

#3 obhasha07  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 21-August 11

Re: How to fix the System.InvalidOperationException error?

Posted 13 September 2011 - 05:01 PM

That's what I'm trying to find out. This error pops up even before any code is the startup form executes
Was This Post Helpful? 0
  • +
  • -

#4 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 1067
  • View blog
  • Posts: 4,174
  • Joined: 02-July 08

Re: How to fix the System.InvalidOperationException error?

Posted 13 September 2011 - 05:08 PM

Most likely it is a variable you are initializing - no break point can catch it. Check all your class variables.
Was This Post Helpful? 0
  • +
  • -

#5 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2271
  • View blog
  • Posts: 9,499
  • Joined: 29-May 08

Re: How to fix the System.InvalidOperationException error?

Posted 13 September 2011 - 05:16 PM

My point is, that it is no Double.

You need to try and parse it, checking to see if the f

Double value =0;
if ( Double.TryParse( theString, value ) == false )
 { */ was problem /*}
else
{  */ no problems /*
 }  


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1