c# - null == x 和 x == null 之间的区别?

标签 c#

<分区>

Possible Duplicate:
What is the difference between these (bCondition == NULL) and (NULL==bCondition)?

我看到过两种方式的比较。是否存在性能差异或仅仅是个人偏好?

我看到它被用在这个答案中:

What are your favorite extension methods for C#? (codeplex.com/extensionoverflow)

最佳答案

在这种情况下,它在 C# 中的个人偏好。

enter image description here

尤达条件句

关于c# - null == x 和 x == null 之间的区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7013263/

相关文章:

c# - BlockingCollection——高同步问题

c# - 如何使用文化类型用印度尼西亚语设置月份名称

c# - 如何制作 float 控件

c# - 内部路由/代理

c# - 用于设置对象属性的 Linq 表达式树是什么?

c# - 带有通用列表的foreach,在使用值类型时检测第一次迭代

c# - 为什么 PngBitmapEncoder 类使我的图像看起来有颗粒感?

c# - "safe"是如何将匿名类型和反射放在一起的?

c# - 如何将 Enum int 值传递给 Controller

c# - WPF MouseRightButtonUp 事件不会触发