【Winform】 无法将类型为“System.Windows.Forms.SplitContainer”的对象强制转换为类型“System.ComponentModel.ISupportInitialize”。
2016-02-22 10:05
561 查看
问题:将dotnet framework 4.0 切换到2.0时,编译没有问题,在运行时出现如下错误:System.InvalidCastException: 无法将类型为“System.Windows.Forms.SplitContainer”的对象强制转换为类型“System.ComponentModel.ISupportInitialize”。
解决方法:
注释掉如下代码(此代码为设计器自动生成代码)
【参考文献】点击进入
解决方法:
注释掉如下代码(此代码为设计器自动生成代码)
//((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); //((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
【参考文献】点击进入
相关文章推荐
- 《Batch Normalization Accelerating Deep Network Training by Reducing Internal Covariate Shift》阅读笔记与实现
- caffe: train error: Serializing 25 layers--- Check failed: proto.SerializeToOstream(&output)
- 使用canvas与Paint在View中居中绘制文字
- Atitit.5gl 第五代语言编程语言 PROLOG教程 人工智能语言的标准 与实现
- Atitit.5gl 第五代语言编程语言 PROLOG教程 人工智能语言的标准 与实现
- Atitit.5gl 第五代语言编程语言 PROLOG教程 人工智能语言的标准 与实现
- background-size: contain 与cover的区别,以及ie78的兼容写法
- rails生产环境 secret_key_base问题
- Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2 failed with exit code 1问题总结及解决方案
- ADG switchover and failover 、三种模式的切换
- golang--sync.WaitGroup使用示例
- find . -name file -exec echo abc > {} \; fail
- ICPCCamp 2016 Day1 ftiasch's Contest #4(All Pair Shortest Path-位运算)
- Conversion to Dalvik format failed with error 1
- HDU 1021 Fibonacci Again
- 集训队专题(6)1001 Air Raid
- cvWaitKey
- 严重: ContainerBase.addChild: start:
- 结合使用saiku、mondrian workbentch建立多维查询报表
- 结合使用saiku、mondrian workbentch建立多维查询报表