方法reanderchathtml没有重载需要9个参数 [英] no overload for method reanderchathtml takes 9 arguments

查看:89
本文介绍了方法reanderchathtml没有重载需要9个参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有以下问题,方法reanderchathtml的任何重载都不能接受9个参数.这是什么意思,我该怎么办?


I have the following problem,no overload for method reanderchathtml takes 9 arguments.What does it means and what should i do?

推荐答案

对于初学者来说,听起来确实很合理由于术语过载"很神秘.本质上发生的是:您正在尝试调用一些写其名称和参数的方法.编译器无法找到与您尝试的代码相匹配的带有签名的方法(即,具有其类型和参数传递方法的参数集).查看API文档,并按API类/结构的期望提供参数.

这很容易解释.问一个问题,如果它不是很清楚,但是最好显示一些代码示例.

现在,有一些背景.术语过载"确实是一个丑陋且晦涩的词,只会分散事物的简单本质.没有什么是真正的超载",因为没有什么是超载".这只是一种行话.事情是:.NET允许使用相同名称的某种类型的多个方法.编译器查看"参数并尝试找到匹配项:要调用的匹配项.如果没有一个方法声明与您的调用代码匹配,则是编译错误.在更罕见的情况下,当可能有多个匹配项时(这不那么琐碎,并且与某些参数的类型的继承有关),这再次是编译错误.

就这样.

—SA
For a beginner, it really may sounds quite cryptic, due to weird term "overload". What essentially happens is: you are trying to call some method writing its name and some parameters. The compiler cannot find the method with the signature (that is, the set of parameters with their types and parameter-passing methods) matching your attempted code. Look at the API documentation and supply the parameter as the API class/structure expects.

That was easy to explain. Ask a question if it was not quite clear, but better show some code sample, for example.

Now, some background. The term "overload" is really ugly and obscure word which only distracts from a simple essence of things. Nothing is really "overloaded" because nothing is "loaded". This is just a kind of jargon. The things are: .NET allows more than one method of some type with the same name. The compiler "looks" at parameters and tries to find the match: which one to call. If none of the method declarations matched your calling code, it''s a compilation error. In more rare case, when more than one match is possible (this is less trivial and related to inheritance of the types of some parameters), it''s again a compilation error.

That''s it.

—SA


这篇关于方法reanderchathtml没有重载需要9个参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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