Is there a workaround for overloading the assignment operator in C#?

后端 未结 7 1787
悲哀的现实
悲哀的现实 2020-12-13 02:43

Unlike C++, in C# you can\'t overload the assignment operator.

I\'m doing a custom Number class for arithmetic operations with very large numbers and I want it to h

7条回答
  •  北海茫月
    2020-12-13 03:02

    Maybe what you're looking for can be solved using C# accessors.

    http://msdn.microsoft.com/en-us/library/aa287786(v=vs.71).aspx

提交回复
热议问题