Dilemma with two types and operator +
- by user35443
I have small problem with operators. I have this code:
public class A
{
    public string Name { get; set; }
    public A()
    { 
    }
    public A(string Name)
    {
        this.Name = Name;
    }
    public static implicit operator B(A a)
    {
        return new B(a.Name);
    }
    public static A operator+(A a, A b)
    {
        return new A(a.Name + " " + b.Name);
    }
}
public class B
{
    public string Name { get; set; }
    public B()
    { 
    }
    public B(string Name)
    {
        this.Name = Name;
    }
    public static implicit operator A(B b)
    {
        return new A(b.Name);
    }
    public static B operator +(B b, B a)
    {
        return new B(b.Name + " " + a.Name);
    }
}
Now I want to know, which's conversion operator will be called and which's addition operator will be called in this operation:
new A("a") + new B("b");
Will it be operator of A, or of B? (Or both?)
Thanks....