C#错误:解析器错误消息 [英] C# Error: Parser Error Message

查看:79
本文介绍了C#错误:解析器错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是编程领域的新手.我已将发布的代码上传到服务器上,当我浏览它时,出现此错误.

I am new to the programming field. I have uploaded the published code onto the server and when I browse it I get this error.

Parser Error Message: The base class includes the field ''SiteView2'', but its type (IqSiteWeb.CustomControls_SiteView) is not compatible with the type of control (ASP.customcontrols_siteview_ascx).


请帮助我


Please help me

推荐答案

无法更改您重写的方法的返回类型.但是,您可以重载方法.在此处查找有关此内容的更多信息: http://sharpertutorials.com/method-overloading-and-overriding/ [ ^ ]

但是,您可能不想过载,因为您可能需要SiteView2的正确实现才能使其正常工作.因此,您需要更改结果类型以使其兼容.

祝你好运!
It is not possible to change the return type of a method you override. You can however overload a method. Look here for more info on that: http://sharpertutorials.com/method-overloading-and-overriding/[^]

You probably don''t want to overload however because you probably need the correct implementation of SiteView2 to get it working. So, you need to change the result type so it is compatible.

Good luck!


这篇关于C#错误:解析器错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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