Results 1 to 3 of 3

Thread: [RESOLVED] Switch Statement Generate Error

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    141

    Resolved [RESOLVED] Switch Statement Generate Error

    Switch Statement Generate Error

    :not all code paths return a value



    public string DentMode(string RecMode,int ButtNo)
    {
    switch(ButtNo)
    {
    case 1:
    Toolbarx.Buttons[1].Enabled = false;
    return "A";
    case 2:
    Toolbarx.Buttons[2].Enabled = false;
    codeFld.Enabled = false;
    codeFld.Focus();
    return "E";
    case 3:
    Toolbarx.Buttons[3].Enabled = false;
    codeFld.Enabled = false;
    return "D";
    case 5:
    Toolbarx.Buttons[1].Enabled = true;
    Toolbarx.Buttons[2].Enabled = true;
    Toolbarx.Buttons[3].Enabled = true;
    return "";
    }
    Last edited by Waseemalisyed; May 10th, 2005 at 06:33 AM. Reason: ok

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width