Are the “if-else” operator and the operator “?:” equivalent?

前端 未结 0 1812
鱼传尺愫
鱼传尺愫 2020-12-16 05:37

Declaring classes

class A
{
    public string a;
    public static implicit operator A(B b) => new A() { a = b.b };
}
class B
{
    public string b;
}


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题