C# winform 报错:类型“System.Int32”的对象无法转换为类型“System.Int16”。

System.ArgumentException

HResult=0x80070057

Message=类型"System.Int32"的对象无法转换为类型"System.Int16"。

Source=mscorlib

StackTrace:

at System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast)

at System.RuntimeType.CheckValue(Object value, Binder binder, CultureInfo culture, BindingFlags invokeAttr)

at System.Reflection.MethodBase.CheckArguments(Object\[\] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig)

at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object\[\] parameters, CultureInfo culture)

at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object\[\] parameters, CultureInfo culture)

at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object\[\] index, CultureInfo culture)

at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object\[\] index)

at System.Reflection.PropertyInfo.SetValue(Object obj, Object value)

at System.Threading.Tasks.Task`1.InnerInvoke()

at System.Threading.Tasks.Task.Execute()

相关推荐
NE_STOP1 小时前
Vide Coding--AI编程工具的选择
java
LDR0062 小时前
Type-C 快充全面升级!LDR6601 赋能个人护理便携电机,重塑剃须刀 / 理发器新体验
c语言·开发语言
雪碧聊技术2 小时前
Tree.js是什么?一文讲透
开发语言·javascript·ecmascript
码云数智-园园2 小时前
C++20 Modules 模块详解
java·开发语言·spring
程序员黑豆2 小时前
JDK 下载安装与配置详细教程
java·前端·ai编程
小宇宙Zz2 小时前
Maven依赖冲突
java·服务器·maven
swordbob2 小时前
NIO的channel中什么是 fd(File Descriptor,文件描述符)
java·开发语言·nio
咖啡八杯3 小时前
GoF设计模式——享元模式
java·spring·设计模式·享元模式
十五喵源码网3 小时前
基于springboot2+vue2的租房管理系统
java·毕业设计·springboot·论文笔记
摇滚侠3 小时前
IDEA 创建 Java 项目 手动整合 SSM 框架
java·ide·intellij-idea