I wonder if I must define a commutative operator (like *) twice!
public static MyClass operator *(int i, MyClass m)
{
return new MyClass(i *
You don't have to do that - you only need to do that if you want to be able to write:
MyClass x = ...;
MyClass y = x * 5;
MyClass z = 5 * x;
If you only want one of the bottom two lines to be valid, you can delete the other operator overload.
Basically, the C# language doesn't assume that multiplication is commutative even in terms of the types involved.