Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8108001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:57:24+00:00 2026-06-06T00:57:24+00:00

No overload for method ‘WeightOut’ takes 2 arguments My code was working before I

  • 0

No overload for method ‘WeightOut’ takes 2 arguments

My code was working before I tweaked it to make it more efficient.

this is the working code:

In the BASE class I have:

public virtual double WeightOut(double weightOut, double wightIn)
        {
            return Math.Round((weightOut = (weightIn + 0.12)), 2);
        }

Then in the INHERITED class I have:

public override double WeightOut(double weightOut, double weightIn)
        {
            return Math.Round((this.WeightIn() + 0.12), 2);
        }

Then I changed it so that I am not using the same code in both classes and rather only in the inherited class as so:

In the BASE class:

public abstract double WeightOut();

In the INHERITED class:

public override double WeightOut()
        {
            return Math.Round((this.WeightIn() + 0.12), 2);
        }

I then got the syntax error when compiling with this line of code that leads from the WeightOut() method in the same INHERTIED class:

public override double HowMuchTheFishWeighOutKG()
        {
            return this.FishPerTank() * this.WeightOut(0, 0) * this.Tanks();
        }

so I then changed it to:

public override double HowMuchTheFishWeighOutKG()
        {
            return this.FishPerTank() * this.WeightOut() * this.Tanks();
        }

The syntax error still stands:

No overload for method ‘WeightOut’ takes 2 arguments.

(ANOTHER SMALLER PROBLEM)
It tells me where the error is: 37,59
but Visual Studio does not show me where that is, and I will have to count myself to find where it is.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T00:57:29+00:00Added an answer on June 6, 2026 at 12:57 am

    A few things I would check:
    In the base class, are you certain that the abstract method for WeightOut has NO parameters. The complaint being issued could have something to do with a mis-match from the inherited function definition.

    Second thing to check, Right Click on the Inherited Classes “WeightOut” function (the function name specifically) and select the option Find All References. This should give you a list of every place in the code, by class name/filename and line number, that calls this function. That might help.

    Note: if you dont have that option, please elaborate which version of Visual Studio you are using?

    Also Note: this can be done with a “Find in Files” search as well for the function name. This search will return more false positives, but will still locate all references to the function.

    Also, even in vs 2005, if you double click the error in the Errors box, it should put your cursor on the line that is causing an issue, or rather the line that is throwing the error, if its not a code line but instead is like a closing }, then that tells us something different.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am keep having the No overload for method 'GenerateSignature' takes 9 arguments problem.
Problem: No overload for method 'LogException' takes 2 arguments. Description: I have a method
This may have been answered before. I see many dynamic method overload resolution questions,
How can I overload a method that takes a Generic List with different types
why cant we overload a method with same return type, name, arguments but with
I am getting the following error: Error 49 No overload for method 'getData' takes
The following nullable decimal code fired Overload Method Error: decimal? t1 = null; decimal?
I cannot use ToList<Tresult>() extension method. The code I use is, return this.Semesters.ToList<ISemester>() 'Semesters'
I know how to overload a method, and how to override a method. But
I would like to overload a method with the @QueryParam but everytime I try

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.