By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,431 Members | 1,811 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,431 IT Pros & Developers. It's quick & easy.

Exiting a function

P: 8
what would i use to only exit the
Expand|Select|Wrap|Line Numbers
  1.     private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
  2. if (this->textBox1->textLength == 0) {
  3. MessageBox::Show("fail!";"D:"; MessageBoxButtons::OK);
  4. exit button1_Click(??)
  5. };
  6. }
  7.  
Nov 5 '08 #1
Share this Question
Share on Google+
2 Replies


boxfish
Expert 100+
P: 469
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.
Nov 6 '08 #2

P: 8
oh yea that's right. thanks!
Nov 6 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.