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

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

问题描述

我正在aspnet.4.0中创建类文件。但我得到错误没有重载方法需要1个参数.. plz解决我的问题..

解决方案

< blockquote>从那个小的,我们不能具体,因为我们没有你的代码。



但这对你来说很简单问题是:查看错误并双击消息。这将带你到导致问题的那一行。

看看它的代码:它将调用一个方法,或构造一个对象并用一个参数调用它:

 myMethod( 参数); 
MyClass mc = new MyClass( A参数);



右键单击带下划线的方法名称 - 这将带您(希望)该名称的唯一重载。检查参数的数量,并更正调用,或者使用正确数量的参数添加第二个重载。


just i am creating class file in aspnet.4.0.but i got error "no overload for method takes 1 arguments"..plz solve my problems..

解决方案

From that little, we can't be specific, as we don't have your code.

But this is pretty simple for you to work out what the problems is: look at the error and double click the message. That will take you to the line that causes the problem.
Look at it code of that line: it will be calling a method, or constructing an object and callign it with one parameter:

myMethod("the parameter");
MyClass mc = new MyClass("A parameter");


Right click the underlined method name - That will take you to (hopefully) the only overload of that name. Check the number of parameters, and either correct the call, or add a second overload with the correct number of parameters.


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

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