帮助!可以请别人帮忙,我不知道该如何解决.请单击链接以解决我的问题 [英] HELP! can please someone help i dont know how to resolve this please click the link to se my problem

查看:84
本文介绍了帮助!可以请别人帮忙,我不知道该如何解决.请单击链接以解决我的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://i50.tinypic.com/ayxfd4.png [推荐答案

这是一个经典示例var类型为何很危险的原因.编译器无法猜测应为productEntity分配哪种类型.使用正确类型的变量,以便编译器可以更好地评估您要执行的操作.

另外,将来,请复制代码和错误消息并将其粘贴到您的问题中,而不是链接到其他位置的图片.
This is a classic example of why the var type is dangerous. The compiler cannot make a guess as to what type should be assigned to productEntity. Use properly typed variables so the compiler can make better evaluations of what you are trying to do.

Also, in future, please copy and paste both the code and the error message into your question rather than linking to a picture elsewhere.


您好
以下编译器错误与您尝试通过匿名传递有关的事实
将类型键入为需要ProductEntity Type的函数,我认为对您来说最好的解决方案是在GetData内创建Product类型而不是Anonymous类型.
功能
Hello
The following comiler error related to the fact that you are trying to pass a Anonymous
Type to a function that expect ProductEntity Type, I think that the best solution for you will be to crate a Product type and not Anonymous type inside the GetData
function


这篇关于帮助!可以请别人帮忙,我不知道该如何解决.请单击链接以解决我的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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