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

后端 未结 7 1745
南旧
南旧 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 (

提交回复
热议问题