Skip to content

Problem with newly added method in DLL.

desperadogopal

Asked Nov 11, 2005, 12:13 AM EST4 answers
Share
LinkedInX
Hi,

I have one DLL. It contains some methods. It was Build as successfully. After that I refered this DLL in one C# web application. It became good. But after I add one more method (has 1 argument) with this DLL successfully.

But the problem is, Now I am refering that DLL in same C# application it causes one error :

"No overload for method 'GetStoredProcedure' takes '1' arguments."

'GetStoredProcedure' this is my newly added overloaded method with single argument.

Everything is Correct. I don't know the reason.


Thank U.

4 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Hi,

    I have one DLL. It contains some methods. It was Build as successfully. After that I refered this DLL in one C# web application. It became good. But after I add one more method (has 1 argument) with this DLL successfully.

    But the problem is, Now I am refering that DLL in same C# application it causes one error :

    "No overload for method 'GetStoredProcedure' takes '1' arguments."

    'GetStoredProcedure' this is my newly added overloaded method with single argument.

    Everything is Correct. I don't know the reason.


    Thank U.


    It could be that your newly added method, which is GetStoredProcedure(), might be someting like
    GetStoredProcedure(string message,bool show); In this case, you must use GetStoredProcedure("hello",true), if you forget to pass a string and boolean value,while calling the method, you will recieve the following error:
    "No overload for method 'GetStoredProcedure' takes '1' arguments."

    try to see if you have more than one method named GetStoredProcedure(), and you are passing correct values when calling the method. I hope this solves your problem.
    0
  • 0
    Hi sunny,

               I have defined 2 method named as 'GetStoredProcedure' (Overloaded). one receive 4 arguments another one receive 1 arguments. But when I calling it in a C# app,It show only one method(4 arguments). How to refreshes another newly added method which takes 1 args.

    No problem with argument passing. Main problem :  why it doesn't refer another method 'GetStoredProcedure(string SPName)'.

    Help would be helpful.
    0
  • 0

    The only reason i can think of ,as to why the dll is not refreshing the GetStoredProcedure(), is that it is not compiled properly. but one of the obvious ones would be that when u compile ur project, u must add a Referance to that .dll file which has GetStoredProcedure overloads. so please check if u have done that. many times these small problems are the ones that we need to tackle in order to solve a major problem. please check that referance and recompile the .dll file with other overloads and try calling those overloads and tell me if they work.
    for example make a test overload like

    public string testing(string message)
    {
    return message;
    }

    now if testing returns the string u entered that means the .dll file is compiled and working properly.

    0
  • 0
    Thank u sunny.

    Problem solved and its working correctly.  But I don't know why it didn't work. According to ur info I have created new class and paste all the code and recompiled the DLL. It's fine.
    0