Designer: Object of type 'System.Int32' cannot be converted to type 'System.Nullable`1[System.Double]'.

0
0

After working through a VB to C# conversion , my large WiseJ app runs on C# and I can load most forms in the designer, except one.  When I try to, I get this error and there is no “Go to code” button to narrow down what’s throwing it.  Any ideas?

https://imgur.com/a/ExJyZco

  • You must to post comments
0
0

The answer was in the assignment of a WiseJ’s Textbox’s InputType.Step, which is a nullable double.

The line was

_txtPhotoScanNudityRejectionThreshold.InputType.Step = 1;

 

Changing it to

_txtPhotoScanNudityRejectionThreshold.InputType.Step = 1.0;

 

solved the problem.

 

 

In VB I believe a whole number is automatically converted to a double, in C# it needs to be cast or specified with the “.0” at the end.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.