C# if no error contiune.. if error occurse do else

Posted by NightsEVil on Stack Overflow See other posts from Stack Overflow or by NightsEVil
Published on 2010-06-11T08:28:04Z Indexed on 2010/06/11 8:32 UTC
Read the original article Hit count: 172

Filed under:
|

hi i have a question i have some code that works good on like 70% of the computers i use it on but.. for some reason theres a few that are pesky and id like to do something like this (keep in mind this is a hypothetical)

private void test_click(object sender, EventArgs e)
    {
MessageBox.Show("hi");
//if it works ok without a error it continues to
MessageBox.Show("worked ok");
 //if it encountered a error of some kind it would go to
MessageBox.Show("DID NOT WORK OK");

}

© Stack Overflow or respective owner

Related posts about c#

Related posts about error