....
and in other code :
MyMethod()
{
MessageBox.show(Convert.ToString(err.number)); // err.number is the
error-number on catch (like VB.NET). what should I write instead?
MessageBox.show(err.Message); // err.message is the error message on
catch. What should I write instead?
}
...
and in other code :
MyMethod()
{
MessageBox.show(Convert.ToString(err.number)); // err.number is the
error-number on catch (like VB.NET). what should I write instead?
MessageBox.show(err.Message); // err.message is the error message on
catch. What should I write instead?
}
C# has no equivalent to VB's Err. Also, most .NET exceptions don't have an
associated error number. It's the type of exception (IOException,
ArgumentNullException, etc.) that is considered important, not a code.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.