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()

相关推荐
默 语1 小时前
MySQL中的数据去重,该用DISTINCT还是GROUP BY?
java·数据库·mysql·distinct·group by·1024程序员节·数据去重
Never_Satisfied2 小时前
在JavaScript / Node.js / 抖音小游戏中,使用tt.request通信
开发语言·javascript·node.js
爱吃小胖橘2 小时前
Unity资源加载模块全解析
开发语言·unity·c#·游戏引擎
oDeviloo2 小时前
新版IntelliJ IDEA个性化设置兼容老版习惯
java·ide·intellij-idea
一只小透明啊啊啊啊2 小时前
Java Web 开发的核心组件:Servlet, JSP,Filter,Listener
java·前端·servlet
spencer_tseng3 小时前
Eclipse Uninstall Software
java·ide·eclipse
千里镜宵烛4 小时前
Lua-迭代器
开发语言·junit·lua
嗯、.4 小时前
使用 iText 9 为 PDF 添加文字水印的完整实战
java·pdf·itext
渡我白衣4 小时前
C++ 同名全局变量:当符号在链接器中“相遇”
开发语言·c++·人工智能·深度学习·microsoft·语言模型·人机交互
淮北4944 小时前
html + css +js
开发语言·前端·javascript·css·html