Any equivalent vbObjectError in c#

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mullin Yu

    Any equivalent vbObjectError in c#

    hi

    in VB, we can have

    Err.Raise vbObjectError + <app_number>, ...
    where "<app_numbe r>" 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!


  • Jon Skeet [C# MVP]

    #2
    Re: Any equivalent vbObjectError in c#

    Mullin Yu <mullin_yu@ctil .com> wrote:[color=blue]
    > in VB, we can have
    >
    > Err.Raise vbObjectError + <app_number>, ...
    > where "<app_numbe r>" 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#?[/color]

    You don't - you throw exceptions instead.

    --
    Jon Skeet - <skeet@pobox.co m>
    Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

    If replying to the group, please do not mail me too

    Comment

    Working...