Any equivalent vbObjectError in c#

  • Thread starter Thread starter Mullin Yu
  • Start date Start date
M

Mullin Yu

hi

in VB, we can have

Err.Raise vbObjectError + <app_number>, ...
where "<app_number>" is some application-defined error number.

This will prevent your error numbers from conflicting with system-defined
error numbers

How do I do the similar at c#?

Thanks!
 
Mullin Yu said:
in VB, we can have

Err.Raise vbObjectError + <app_number>, ...
where "<app_number>" is some application-defined error number.

This will prevent your error numbers from conflicting with system-defined
error numbers

How do I do the similar at c#?

You don't - you throw exceptions instead.
 

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.

Ask a Question

Back
Top