overloading + and += operators for “Number Classes”

前端 未结 4 850
野性不改
野性不改 2021-02-08 14:45

I want to create extension functions for classes that encapsulate simple Numbers. For example DoubleProperty. I encountered the problem, that I can\'t

4条回答
  •  猫巷女王i
    2021-02-08 15:07

    If DoubleProperty is your class, you can make plus and plusAssign its methods, that should resolve any ambiguity.

提交回复
热议问题