Exiting a function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hacksign23
    New Member
    • Nov 2008
    • 8

    Exiting a function

    what would i use to only exit the
    Code:
    	private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
    if (this->textBox1->textLength == 0) {
    MessageBox::Show("fail!";"D:"; MessageBoxButtons::OK);
    exit button1_Click(??)
    };
    }
  • boxfish
    Recognized Expert Contributor
    • Mar 2008
    • 469

    #2
    I don't know what sort of thing a button1_click is, but if you want to exit a function right away, you use a return statement.
    return;
    But I don't know if this is appropriate in a button1_click.

    Comment

    • hacksign23
      New Member
      • Nov 2008
      • 8

      #3
      oh yea that's right. thanks!

      Comment

      Working...