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

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

问题描述

Hello Good Noon .. !!



这里我写代码但我得到一个错误说没有重载方法'Thumbimages'需要5个参数



任何人都可以帮助我,我能为它做些什么



  if (!(flag ==   pdf)) 
{
GeneralMethods.Thmbimages(pathname,actFolder,imgName,ConfigurationManager.AppSettings [ ACTUAL_IMAGE_WIDTH ],ConfigurationManager.AppSettings [ ACTUAL_IMAGE_HEIGHT]);
GeneralMethods.Thmbimages(pathname,midthumbFolder,imgName,ConfigurationManager.AppSettings [ GALLERY_MID_THUMBWIDTH] ,ConfigurationManager.AppSettings [ GALLERY_MID_THUMBHEIGHT]);
GeneralMethods.Thmbimages(pathname,thumbFolder,imgName,ConfigurationManager.AppSettings [ GALLERY_THUMBWIDTH] ,ConfigurationManager.AppSettings [ GALLERY_THUMBHEIGHT]);
}







谢谢

解决方案





这个方法是由你创建的还是什么?



检查一下你需要方法的类型和数量。



例如,我有一种方法 -



public TestMethod(string s1,int i1)

{

//我的代码....

}



现在调用这个方法我必须以相同的顺序传递两个参数。



TestMethod(String 1,1) ;





这清楚了吗???



问候,



Nilesh Shah


我不知道GeneralMethods和ThmbImages是什么,但我认为这是你或别人的方法在你的公司已创建。



然后似乎有人改变了方法的定义,以便参数的数量wa已经改变了。



如果你开始写GeneralMethods.Thmbimages(那么你的intellisense应该告诉你应该提供什么参数以及是否有一个或多个重载接受不同数量的参数。



希望这有帮助......


你想要实现的目标是什么?



我们可以看看它的目的是什么。



(顺便说一下,这是丑陋的代码)

Hello Good Noon..!!

here i write code but i get an Error says "No Overload method 'Thumbimages'takes 5 arguments"

anybody help me what can i do for it

if (!(flag == "pdf"))
        {
            GeneralMethods.Thmbimages(pathname, actFolder, imgName, ConfigurationManager.AppSettings["ACTUAL_IMAGE_WIDTH"], ConfigurationManager.AppSettings["ACTUAL_IMAGE_HEIGHT"]);
            GeneralMethods.Thmbimages(pathname, midthumbFolder, imgName, ConfigurationManager.AppSettings["GALLERY_MID_THUMBWIDTH"], ConfigurationManager.AppSettings["GALLERY_MID_THUMBHEIGHT"]);
            GeneralMethods.Thmbimages(pathname, thumbFolder, imgName, ConfigurationManager.AppSettings["GALLERY_THUMBWIDTH"], ConfigurationManager.AppSettings["GALLERY_THUMBHEIGHT"]);
        }




Thank you

解决方案

Hi,

This method is created by you or what?

Check what type and number of arguments you method is required.

for Example, I have one method-

public TestMethod(string s1,int i1)
{
//My code....
}

Now to call this method i have to pass two arguments in the same order.

TestMethod("String 1",1);


Is this clear for you???

Regards,

Nilesh Shah


I have no idea what GeneralMethods and ThmbImages is, but I assume it's a method you or somebody else in your company have created.

Then it seems like someone has changed the definition(s) for the method so that the number of parameters wanted has changed.

If you start writing "GeneralMethods.Thmbimages(" then your intellisense should tell you what parameters you should supply and whether or not there are one or more overloads accepting a different number of parameters.

Hope this helps...


What is it you are trying to achieve?

Just so we can see what the aim is.

(BTW it is ugly looking code)


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

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