我是如何在这里结束的:" Exception.InnerException了解详细信息.错误是:从字符串"B"转换为"B".键入“布尔" [英] How did I wind up here: "Exception.InnerException for details. The error is: Conversion from string "B" to type 'Boolean"

查看:104
本文介绍了我是如何在这里结束的:" Exception.InnerException了解详细信息.错误是:从字符串"B"转换为"B".键入“布尔"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已经在一个程序上工作了数周,并且运行良好,当我好几天都没有接触该程序时,突然收到这个神秘的消息,我正要把它交给我:
创建表单时发生错误.有关详细信息,请参见Exception.InnerException.错误是:从字符串"B"到类型"Boolean"的转换无效.



Having been working on a program for weeks and it working perfectly I was just about to hand it over when I suddenly got this mystifying message when I haven''t touch the program for days:

An error occurred creating the form. See Exception.InnerException for details. The error is: Conversion from string "B" to type ''Boolean'' is not valid.



Namespace My

    'NOTE: This file is auto-generated; do not modify it directly.  To make changes,
    ' or if you encounter build errors in this file, go to the Project Designer
    ' (go to Project Properties or double-click the My Project node in
    ' Solution Explorer), and make changes on the Application tab.
    '
    Partial Friend Class MyApplication

        <Global.System.Diagnostics.DebuggerStepThroughAttribute()>  _
        Public Sub New()
            MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
            Me.IsSingleInstance = false
            Me.EnableVisualStyles = true
            Me.SaveMySettingsOnExit = true
            Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
        End Sub

        <Global.System.Diagnostics.DebuggerStepThroughAttribute()>  _
        Protected Overrides Sub OnCreateMainForm()
            Me.MainForm = Global.Nirro.fmMaintain
        End Sub
    End Class
End Namespace



我关闭了调试中的仅我"选项,以解决此问题,但无法继续进行下去.
突出显示的部分似乎是问题所在,但这对我没有帮助.
我在加载表格时遇到了这个错误!!
"Public Class fmMaintain"部分中没有代码(我将其删除了)

它在"Me.MainForm = Global.Nirro.fmMaintain"部分停止



I turned off the "Just me" option in debugging to get this far but can''t get any further.
The high lighted part seems to be where the problem is, but that''s of no help to me.
I''m getting this error just loading the form up!!
There''s no code in the "Public Class fmMaintain" section ( I removed it )

It stops on the "Me.MainForm = Global.Nirro.fmMaintain" part

Help please!!

推荐答案

通过逐行创建整个程序解决了该问题.罪魁祸首是一个if语句.

TxtCondition.Text<> "A"或"B"或"C".

谢谢微软!!!
Solved it by creating the whole program line by line. The culprit was an if statement.

TxtCondition.Text <> "A" or "B" or "C".

Thanks Microsoft!!!


这篇关于我是如何在这里结束的:&quot; Exception.InnerException了解详细信息.错误是:从字符串"B"转换为"B".键入“布尔"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆