How to verify whether a type overloads/supports a certain operator?

后端 未结 3 1363
孤城傲影
孤城傲影 2020-12-10 15:18

How can I check whether a certain type implements a certain operator?

struct CustomOperatorsClass
{
    public int Value { get; private set; }


    public C         


        
3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-10 16:09

    You should check if class have method with op_Addition name You can find overloaded method names here,
    Hope this helps

提交回复
热议问题