Is it possible to create a new operator in c#?

后端 未结 7 1719
南旧
南旧 2020-11-29 06:46

I know you can overload an existing operator. I want to know if it is possible to create a new operator. Here\'s my scenario.

I want this:

var x =          


        
相关标签:
7条回答
  • 2020-11-29 07:51

    No, but you can overload some existing operators in C#.

    In some other languages, like F#, you can use:

    let (<?) = min
    
    0 讨论(0)
提交回复
热议问题