overloading + and += operators for “Number Classes”

前端 未结 4 764
别那么骄傲
别那么骄傲 2021-02-08 11:56

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 12:02

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

提交回复
热议问题