Avatar of Dovberman
Dovberman
Flag for United States of America asked on

Error: Method Must Have a Return Type

I am trying to write a simple procedure.
The following should be simple, but I am getting a compile error.
What do I need to change?
Thanks,

Boolean blnIsOK;
    short intSizeA = 12;
    short intSizeB = 12;
    blnIsOK = StartCalcs(intSizeA,intSizeB);  //Error: Method Must Have a Return Type

    protected Boolean StartCalcs(short pintSizeA,short pintSizeB)
    {
        Boolean blnOK = true;
 
        return blnOK;
    }
ASP.NET.NET Programming

Avatar of undefined
Last Comment
Dovberman

8/22/2022 - Mon
Jacques Bourgeois (James Burger)

Where is the first block of code in relation to the method? In the same class or somewhere else?

If not, there might be another method with the same name but declared with void in the class that is calling the method. Right click on the call and GoTo definition to see where it leads you.
ASKER CERTIFIED SOLUTION
dejaanbu

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
pkbugudai

Dear!!!

1. go to menu bar -> build -> clean solution
2. rebuild solution
Dovberman

ASKER
Thanks to all.  I will research this whan I return from a lunch appointment.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Dovberman

ASKER
I needed an event.

  protected void cmdMannWhitney_Click(object sender, EventArgs e)
    {
        short intSizeA = 12;
        short intSizeB = 12;
        bool blnOK = StartCalcs(intSizeA, intSizeB);
        double dblS = Math.Sqrt(24);
        int MinVal = Math.Min(12, 14);
    }

Thanks,
Dovberman

ASKER
Thanks.