overloading + and += operators for “Number Classes”

前端 未结 4 2217
故里飘歌
故里飘歌 2021-02-08 14:41

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

4条回答
  •  离开以前
    2021-02-08 15:07

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

提交回复
热议问题