Why can '=' not be overloaded in C#?

前端 未结 12 903
离开以前
离开以前 2020-12-30 00:49

I was wondering, why can\'t I overload \'=\' in C#? Can I get a better explanation?

12条回答
  •  被撕碎了的回忆
    2020-12-30 01:32

    It's allowed in C++ and if not careful , it can result in a lot of confusion and bug hunting.

    This article explains this in great detail.

    http://www.relisoft.com/book/lang/project/14value.html

提交回复
热议问题