I\'m reading about extension methods, and monkeying around with them to see how they work, and I tried this:
namespace clunk {
public static class oog {
Unfortunately you cannot introduce new operators, or implement support for existing operators, on types, through extension methods.
Basically, what you want to do cannot be done.
The only way to introduce new operators is to put them in one of the involved types. For binary operators you can put them in your own type, provided your type is one of the two, for unary types you need to put the operator inside the type itself.
Since you can't extend an int
in any way, you can't do it.