Why casting to object when comparing to null?

后端 未结 5 1796
故里飘歌
故里飘歌 2021-01-07 21:04

While browsing the MSDN documentations on Equals overrides, one point grabbed my attention.

On the examples of this specific page, some null checks are made, and the

5条回答
  •  花落未央
    2021-01-07 21:58

    I believe casting to System.Object would get you around any operator overloading that TwoDPoint might have.

提交回复
热议问题