operator overloading and unchecked vs checked

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

    operator overloading and unchecked vs checked

    I've created my own value type which will overload
    the "+" operator. I have two routines to do addition,
    differing only in that one throws an error on overflow.

    Is there a way to get the compiler to apply unchecked
    and checked semantics to my type: calling MyAdd() for
    unchecked code and MyAdd.ovl() for checked code?

    Thanks,
    Keith

Working...